I have a form. I would like to execute my AJAX call on form submit, and only after its execution continue form submiting.
Here is the code example:
$('myform').observe('submit', function(e) {
e.stop();
new Ajax.Request('/myurl', {
method:'get',
onComplete: function(transport) {
//Here I would like to continue form submitting
},
});
});