I'm trying to dynamically change the contents of a select box by doing the
following...
function myfunc() {
var obj=document.ge tElementById("o bjname"); // name of the select box
var str='';
str+='<option>b lah</option>';
obj.innerHTML=s tr;
alert(obj.inner HTML);
}
For reasons I don't understand, the alert gives me 'blah</option>'. Where is
the leading <option> tag?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
following...
function myfunc() {
var obj=document.ge tElementById("o bjname"); // name of the select box
var str='';
str+='<option>b lah</option>';
obj.innerHTML=s tr;
alert(obj.inner HTML);
}
For reasons I don't understand, the alert gives me 'blah</option>'. Where is
the leading <option> tag?
--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cybers pace.org | don't, I need to know. Flames welcome.
Comment