Passing form parameters with remote_function

Also you can use the submit option

<%= submit_tag 'Save', :name => 'save', :id => 'save' %>
<%= submit_tag 'Update Preview',
:name => 'preview',
:onclick => remote_function(
:url => {:action => :preview, :_method => :post},
:submit => "id_of_my_form",
:before => "$('preview_target').innerHTML='..loading..'",
:failure => "$('preview_target').innerHTML='Ajax error!'",
:update => 'preview_target'
) + ';return false;'
%>

Read http://www.timocracy.com/articles/tag/remote_function for detailed
information on various ways of doing this.

--Jinal Jhaveri

http://jjhaveri.googlepages.com/

Wes Gamble wrote: