On 23.1.2008, at 7.10, Michael Sharman wrote:

>
> Hi guys,
>
> I want to submit a form via Ajax but have the form degrade to a
> standard (full page) submission when users don't have javascript. I'd
> like my markup to be clean, so I'd rather not have any onsubmit="" in
> my <form> tag.
>
> Currently I have an Event.observe('myForm', 'submit', handler), but in
> my function (handler) I can't stop the form from doing a full page
> submission.
>
> I've tried Event.stop(event); but that doesn't work.
>
> I'm using Prototype 1.6
>
> Any ideas?

Try out Low Pro: 
http://jlaine.net/2007/8/6/from-rails-ajax-helpers-to-low-pro-part-2

Event.addBehavior({
   '#my_form' : Remote.Form
});

Cheers,
//jarkko

--
Jarkko Laine
http://jlaine.net
http://dotherightthing.com
http://www.railsecommerce.com
http://odesign.fi



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to