I have a Behavior on my form for onSubmit
Event.addBehavior({
"#formid:submit" : function(event) { dofomstuff(this); }
});
I want to prevent the form from actually submitting as I am doing it
via Ajax in the dofomrstuff() function.
For testing I have this
var doformstuff = function(){
alert("you want to submit the form");
return false;
}
But after responding to the alert, the form submits any way..
I also tried
Event.addBehavior({
"#formid:submit" : function(event) { return dofomstuff(this);
}
});
AND
Event.addBehavior({
"#formid:submit" : function(event) { dofomstuff(this); return
false;}
});
With out any luck.
Whats the right way to prevent the form from submitting?
______________________________________________________________________
Alex Duffield ❖ Principal ❖ InControl Solutions . http://
www.incontrolsolutions.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Spinoffs" group.
To post to this group, send email to
rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---