First, Drop down listBoxes and listBoxes are the same "SELECT" tag in HTML so the method is the same. Let's say your SELECT id is "mySelect". Do the following :
Code:
function addToList(value, text) {
var oSel = document.getElementById("mySelect");
var oOption = document.createElement("OPTION");
oSel.options.add(oOption);
oOption.innerText = text;
oOption.Value = value;
}
Water is not bad as long as it stays out human body ;-)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.