Forum Moderators: open

Message Too Old, No Replies

Build input text field with drop down selections

         

salewit

11:32 pm on Oct 27, 2007 (gmt 0)

10+ Year Member



I'm not sure if this is even possible or not. We've got a product database and one of the fields is just a list of CODED keywords to search on. The field may look like this: "ual del swaa" etc. The reason we've used codes is because the keywords are just too long to type in so we have a cross ref table. In this example it would be too tedious to enter say "united airlines delta airlines southwest airlines", etc thousands of items.

When we enter these fields in our home-made data entry page, it was getting hard to remember all the codes, so I loaded the codes into a drop-down box right next to the text input field for reference. It helps 100%, but what would be ideal is to be able to actually click on the drop-down item and have it APPENDED to the text field for however many codes I need to enter.


<input type="text" name="keywords">
<select>
<option value="ual">United Airlines (ual)</option>
<option value="del">Delta Airlines (del)</option>
<option value="swaa">Southwest Airlines (swa)</option>
etc, etc
</select>

Can it be done?

extromedia

7:25 pm on Oct 28, 2007 (gmt 0)

10+ Year Member



Yes. Add an "onchange" event handler to the select list.