@7studMar 10.2005 — #var new_option = document.createElement("option"); //creates a new <option> var text = document.createTextNode("hat"); //creates the displayed text new_option.appendChild(text); //puts the text between the <option> tags
new_option.setAttribute("value", "hat"); //gives the option a value attribute equal to "hat"
document.getElementById("my_select").appendChild(new_option); //appends the <option> to the end of the list
@andyb4authorMar 10.2005 — #Thanks so much for the quick help ... works like a charm. I really should get my nose out of php occasionally and get proficient in javascript!