autocomplete fill in text fields

If you have an autocomplete and you have several text fields that have
the other columns from the db.

How do you autocomplete on a box and when you select it it fills in
the other text fields with the rest of the data from the table?

When the autocomplete value is selected do an ajax call to your
application returning the data you need to fill in using a format you
can parse in JavaScript like JSON and set the form values.

ok where do I do that at?

OK, pardon my ignorance I guess. Should I do set an instance variable
for the output then use that in the RJS to populate the rest of the
text_fields with the other data? Seems that is the way to go.

WOW, that is cool. I cannot thank you enough. I guess I will learn to google properly. Never though of asking for the obvious. DOH!!