the dropcode example in (select values for another dropdown) [url]http://javascript.internet.com/forms/dropdown-box-population.html[/url] works fine with IE. But is not working with Mozila’s FireFox browser.
can anyone help me to fix this problem? I would be happy if someone send me cross browser dropdown options
@javaNoobieOct 25.2004 — #Author seems to be trying to use DOM.. I believe DOM methods are cross-browser yes? Try the following:
Replace myEle.value = x ; with myEle.setAttribute('value',x); and myEle.text = ItemArray[x] ; with <i> </i>var txt = document.createTextNode(ItemArray[x]); myEle.appendChild(txt)
Lastly, controlToPopulate.add(myEle) with controlToPopulate.appendChild(myEle)