Hi,
I'm catching all form submissions for a last minute AJAX call:
The catch works fine in IE and FF (my main targets). Here's the thing though, if I add an Alert to the onSubmitH function then everything within that function is executed, if I don't then nothing happens. It's supposed to call the server and write an entry to the DB. The DB entry gets written as long as the Alert is in there, but nothing if it's not.
It seems like the page is getting submitted too quickly and that the user interaction (the Alert) gives time to finish the process, is there anything else I could add in there that would keep page control long enough to finish the ajax call but not involve user input?
Thanks
Travis Hawkins
I'm catching all form submissions for a last minute AJAX call:
Code:
for(var c=0;c<document.forms.length;c++)
{
if(window.addEventListener)
{
document.forms[c].addEventListener('submit', onSubmitH, false);
}
else
{
document.forms[c].attachEvent("onsubmit", onSubmitH);
}
}
It seems like the page is getting submitted too quickly and that the user interaction (the Alert) gives time to finish the process, is there anything else I could add in there that would keep page control long enough to finish the ajax call but not involve user input?
Thanks
Travis Hawkins