
Adding options to a select element
Does anybody know how I can dynamically add items to a select box without
refreshing the page.
Example: I have a text box with a button, user types in word into text box
and clicks button. An item is then added to the select box on that page.
CODE:
onclick event -
function addToList(strLocation)
{
if (strLocation != "" && strLocation != null)
{
add item to selet box
}
}