Forum Moderators: open
BUT, he also wants an item in the select list to say "Other"...no big deal...so far.
If a user chooses the "other" item, the select list would then "turn into" (his words) an editable text field of sorts which the user could then use to input a non-listed name.
Anybody know how to do this? Or something simular? It seems like I've seen this before, but not very often.
All help greatly appreciated.
Neophyte
Instead of using a prompt(), you could pop up another small form in a window and send the new value to the parent window, if XPSP2 lets you. :)
Otherwise:
The reason you'd use a SELECT box is to _restrict_ user input.
The reason they want 'other' is that they've come up with something to enter that's not in the list.
So, my solution is to place a SELECT box (nameless) above a (named) INPUT box.
When a value's selected (onChange), copy it into the INPUT box.
Or they can type what they want. Problem solved!
The beauty of this, if you're using a database, is that you can populate the SELECT box using "SELECT DISTINCT(value) FROM table". I can almost guarantee that after a few weeks or months they'll come back to you asking for the 'Other' option to be taken out because they can see for themselves how much crap has been entered ;)