CyberFerret a écrit :
> I have a RoR form for taking line items for an order.  I have got
> autocomplete working for the Product Description so that users can
> find a product really easily.  What I want though, is for whenever a
> user accepts a product description using the autocompleter, the
> product_code, product_units and product_price fields also get
> automatically populated from the selected record from the product
> masterfile.

Put these in your <li>'s as well, say in <span> elements with proper
class names (you can then exclude them from auto-completion use by
properly setting the auto-completer's 'select' option).

Then use the afterUpdateElement callback to grab these ($$ or
getElementsByClassName should do) and auto-populate your other fields.

-- 
Christophe Porteneuve a.k.a. TDD
"[They] did not know it was impossible, so they did it." --Mark Twain
Email: [EMAIL PROTECTED]

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

Reply via email to