I have some AJAx cod which behave very awkward..
I have some submit code which i submit the value to a page.
Here is what i do:
i have a form and input type text named as firstname..
then i have button as:
<input type="button" name="abc" onClick="doForm()">
Here is my Script Code:
doForm = function()
{
ColdFusion.Ajax.submitForm('formName', page.cfm', myCB3,
myError3);
}
myCB3 = function(resp){
var msgDiv = document.getElementById('message');
msgDiv.innerHTML = resp;
}
myError3 = function(sc,msg){
alert('Error!!! ' +sc +' '+msg);
}
Then i use <div> tag to display the error or success
message as:
<div id="message"></div>
on my Page.cfm i have something like this:
<cfif form.firstname IS 0>
Err! Please enter first name
<cfelse>
query stuff
Done!!! entereted successfully
</cfif>
What it do is it loads something the message in the div and
sometime it don't.
I have firebug enabled and when it does not show me that it
has executed..
i open firebug and see its response. i see the message there.
is something wrong i am doing..
Please show me a way guys.