views:

40

answers:

2

I'm using

<%= text_field 'person', 'one',:id => 'test', :onchange=>remote_function(:url=>{:action=>"update"}, :update=>"test") %>
<div id="test"></div>

Now I just want to send the value of text_field with :action i.e :url=>{:action=>"update(value_of_text_field_entered"}

Don't want to use params[:person][:one].

Any suggestions?or how can I use <%= observe_field %> to send the value with action?

+1  A: 

Use

<%= text_field 'person', 'one',:id => 'test' %>

<%= observe_field 'persone_one', 
     :url=>{:action=>"update"} ,
 :frequency => 0.25,
     :update=>'test',
     :with => 'person_one'
     %>

<div id="test"></div>

you get value of textfiled in params[:person_one]

Salil
+1  A: 

maybe you can use a javascript code, "this.value()"

davit