On Apr 6, 2005 7:09 AM, Jack Christensen
<jack-BsDU1ACF2Bglk5EcyZIkJQ@public.gmane.org>
wrote:> I''m looking for a way to do a lookup field for linked tables like
you
> can in MS Access. I''d like to have an autocomplete field with
dropdown
> box ala Google Suggest. But rather than post the value of autocompleted
> text I want it to post the foriegn key value of the selected item.
I''ll
> have at the very least thousands of records in my foreign key tables so
> using a select box like the OnLamp cookbook tutorial does for categories
> is not feasable. Is something like this possible with Rails Ajax support?
Yup, it''s very possible. Look into the observe_field
(http://rails.rubyonrails.com/classes/ActionView/Helpers/JavascriptHelper.html#M000334)
helper. It''s all very new, so there''s nothing you can drop in
to have
a fully functional live search in seconds. I think with a little
tinkering, you can get something going pretty quickly.
--
rick
http://techno-weenie.net