Search code examples
ruby-on-railsruby-on-rails-2

Send html input value in ajax


I am having a problem in getting the html input value in the ruby periodically_call_remote...

For example:

i have an input named my_input. Now i want to have this in the periodically_call_remote.

<input name="my_input" />

periodically_call_remote(:url=>{:action=>"action_name", :controller=>"controler_name", nvalue=>"value_of_my_input"}, frequency=>"5")

This is the call in which i want to have the input value in the value_of_my_input.

rails gem version: 2.3.5

how will i achieve this..?


Solution

  • i have achieved what i wanted... the code is as:

    periodically_call_remote(:url=>{:controller=>"controller_name", :action=>"action_name"), :with=>"'name='+jQuery('#id').val()")
    

    Thnx for your help and time brothers...