I was having trouble determining what was cause my form to not submit when I called
$('#form').submit();
through javascript (but submitted fine when I clicked on the submit button). So I add this piece of code for testing:
$('#form').live('submit', function()
{
alert('submitting form');
return true;
});
Now when I click the submit button, the alert displays and then the form submits. When I call:
$('#form').submit();
through javascript, the alert displays however the form does not submit. Now I am pulling the form through ajax onto a modal window so not sure if that has anything to do with it. Anyone know what might be causing this issue?
The
submitevent is not supported with thelivefunction.From the jQuery API: