Hey Scott,
I confess I haven't followed your thread so far, but on your current
question:
Scott Phillips a écrit :
> Totally works thanks. One last question, when I do it onsubmit, is
> there some way to actually then prevent the form from being submitted?
> My goal is to avoid the page refresh... thanks!
If you bind the submit event for your form, your listener function gets
passed the event object. Just call Event.stop on it! Example:
-- HTML
<form id="frmMain"...>
...
</form>
-- JS
function handleForm(e) {
// Your processing, then (or before it):
Event.stop(e);
}
// At DOM/page load time:
$('frmMain').observe('submit', handleForm);
'HTH
--
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---