Hi Vinay,

This shud help you,
getCommunity is the action in my controller, which gets called after 
update.
Also notice, that i get the id of chosen value by doing value.id , also 
events are captured in element and value. Hope this helps.

<%= text_field_with_auto_complete 'salary_review','company', {}, 
:skip_style => true ,:frequency => 0.1, :indicator => 
'status-indicator',
      :after_update_element => "function(element,value){" + 
remote_function(:update => 'salary_review_company', :url => { :action => 
:getCommunity }, :with => "'id='+ value.id ") + "}" %>


If the user doesn't choose any, i tried using observe_field. But it 
didn't do too well, so i stopped using it.

Regards,
Sandeep G

Vinay wrote:
> Hi Sandeep,
> Can you show me how to call a remote_function
> with :after_update_element? I need almost the exact same
> functionality. Once a user chooses an option from the autocomplete
> list, i want to update a div with more information relating to the
> selected option. Also, did you find a solution for when the user
> doesnt select anything from the list?
> Also, how did you manage to parse the id of the selected option along
> with the form values? Mine is a belongs_to association and so i am
> using model_auto_completer for now. I hope you can help me with this.
> Here is my post on this 
> http://groups.google.co.in/group/rubyonrails-talk/browse_thread/thread/5a91ddc41c1c44d9
> 
> On Jul 20, 12:46�am, Sandeep Gudibanda <[EMAIL PROTECTED]

-- 
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