Hi!
I'm on Rails 2.2.2 and using text_field_with_auto_complete which works
fine.

Now I want to use :after_update_element to send some data back to the
server when my text field is updated.

I have the following code in my view:

<%= text_field_with_auto_complete :company, :name, {},
      {:after_update_element =>
    "function(element,value){" + remote_function(
    :url => { :action => :update_search_session },
    :with =>"'selected_company_name='+element.value") + "}",
    :skip_style => false, :method => :get }
%>

I can see that my controller method (:update_search_session) gets called
allright but I can't figure out how to access the returned data
(element.value).

Can anyone help?

TIA, Peter
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to