Archive for 15th January 2007

Dynamically Populating A Listbox From A Textbox Via JavaScript / DOM

Recently asked on Yahoo! Answers:

Where can I find the javascript that lets me move an item from a textbox to a list?

I have a text field, an ADD button, a list feld (empty) and a DELETE button. I want the user to be able to type something into the textfield, click ADD, and have that item appear in the list. If they select an item from the list and click DELETE, then the item would be deleted. Can someone post the code or a link to some free javascript?

You can actually find bits and pieces of this code out on the Interweb (as one of my clients calls it) quite easily, but packaged together isn’t so easy. So, I’ll tie it all together and explain how it works.

Continue reading ‘Dynamically Populating A Listbox From A Textbox Via JavaScript / DOM’ »