Use the Rails observe_field function (http://api.rubyonrails.org/
classes/ActionView/Helpers/PrototypeHelper.html#M000966):-
Here is an example of it in use (http://www.railshosting.org/
#live_searching), obviously they are using it for a different purpose
but the underlying logic is the same:-
1. Observe field changing
2. Make AJAX request
3. Update page element
Regards,
Jabbslad
On Feb 22, 7:17 pm, Keaja
<jasonmw...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Does anyone have any information or links to tutorials on how to have
> a select list update other fields in a form using ajax?
>
> Example. I have list of customers stored in a database. I would like
> to have a drop down containing a list of customers on a form, that
> when selected, would update several input fields on a form with the
> customer details from the database.
>
> Any ideas?
>
> Thanks!
--~--~---------~--~----~------------~-------~--~----~
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---