Hi,
Is it normal that a call to $(‘some_form’).submit() doesn’t result in
the
execution of an onsubmit event handler on ‘some_form’?
Thanks,
- Rowan
Hi,
Is it normal that a call to $(‘some_form’).submit() doesn’t result in
the
execution of an onsubmit event handler on ‘some_form’?
Thanks,
It’s just how forms work. The equivalent of clicking the submit
buttons is something more like:
if ($(‘my_form’).onsubmit()) $(‘my_form’).submit();
When submitting a form with Ajax, onsubmit serializes the form,
initiates the remote request and returns false. submit() is never run.
-Jonathan.
I should have (but hadn’t) realized that I could simply run
$(‘my_form’).unsubmit() myself.
Thanks for kindly pointing me where I should have looked in the first
place
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs