submitHandler: function (form)
{
form.submit(); // jQuery(form).submit();
window.close();
}
I am using the above submitHandler
in validating my form through jQuery validation plugin, but the form is not getting submitted. But, if I use the commented line instead, then the form is submitted but browser shows the 开发者_运维知识库following dialog and starts to become unresponsive, although on terminating the script by clicking "yes", the form data had been saved and window does not close.
"Stop running this script?"
"A script on this page is causing your web browser to run slowly.
If it continues to run, your computer might become unresponsive."
"Yes" "No"
The commented line is an example of the too much recursion problem explained in the jQuery validation docs.
Why the usual form.submit()
does not work in your case is a bit difficult to tell without more example code. It's possible that calling window.close()
aborts the form submission?
精彩评论