firstruby

Master ruby with us

remote_function or link_to_remote with multiple parameters in Ruby on Rails

Posted by firstruby on November 3, 2008

We can pass the multiple parameters with remote_function or link_to_remote…

<%= link_to_remote "View Data",
:url => :action => "list",
:with => " 'name=' +$('div-id-of-name-text-box').value + '&city=' +$('div-id-of-city-text-box').value + '&country=' +$('div-id-of-country-text-box').value " %>

or

<%= remote_function(:url => :action => "list",
:with => " 'name=' +$('div-id-of-name-text-box').value + '&city=' +$('div-id-of-city-text-box').value + '&country=' +$('div-id-of-country-text-box').value " ) %>

Advertisements

3 Responses to “remote_function or link_to_remote with multiple parameters in Ruby on Rails”

  1. Aziz said

    🙂 couldn’t find this any where else 🙂

  2. rent apartments nerja…

    […]remote_function or link_to_remote with multiple parameters in Ruby on Rails « firstruby[…]…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: