Okay, a little off of the topic I'm haing another strange problem with this same page. Here's what I'm trying to do:
I have 2 autocomplete fields, both drawing from the same data. The first contains the primary key for the database, the second contains a description field. When the first field is filled by a valid key (by clicking 'enter' or moueclick on an element from the autocomplete dropdown) it is disabled using JavaScript (setting readOnly=true). This keeps it from being edited etc. The second field also uses an autocomplete, but searches by the description. Since it is not a unique key, when someone selects an item from this autocomplete dropdown it gets the primary key, then moves the value to the primary field and gets the info (thus doing the same thing as if the user put the primary key in the primary key field and filling in the rest of the info). The new problem I'm having is that pressing 'enter' on the SECOND autocomplete field closes the autocomplete dropdown (as if I had selected a value) but doesn't actually insert the value. If I click on a selection with the mouse it works, though. Why would the mouse-click work but not the keypress? This is, of course, on top of my original problem of not being able to disable the second field without making it readOnly, which I can't do because it must be editable. This is tough, and I'm starting to believe impossible. :-( --mobrien118 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
