Greetings, Jan 1st 2013
A brief question, why would the below code load the information twice while it appears to have looped twice. Works great just loads the select box with the same variables twice? The commented line as well works great alone, however, double loads ..any ideas?
Appreciatively,
Ted
Code:for(i = 0; i < 11; i++){ val='test line - '+i; txt='test'+i; //document.getElementById("companyspecificmacs").add(new Option(testtxt,testtxt)); var x = document.getElementById("companyspecificmacs"); var option = document.createElement("option"); option.text = 'test line - '+i; try { x.add(option, x.options[null]); } catch (e) { x.add(option, null); } }



Reply With Quote
Bookmarks