i have a form that i stop from submitting and when confirm message pops up and user clicks yes i want when that happens to submit the form,how can i do that?i tried using fireEvent like this but it wont work...in firebug it says e is undefined.

window.addEvent('domready', function(){

var form=document.adminForm;

form.addEvent('submit', function(e){

var result=confirm("Are you sure!?");

e.stop();

if(result){

form.fireEvent("submit");

}

});

});

网友答案:

you need to stop the event before the confirm and submit after. http://jsfiddle.net/dimitar/qAx6H/