Dynamically filling selectbox contents

Results 1 to 2 of 2

Thread: Dynamically filling selectbox contents

  1. #1
    Join Date
    Dec 1969

    Default Dynamically filling selectbox contents

    I am filling the contents of a select box based on the value of another. This works fine in IE, but in netscape it looks like a list boxwithin a select box. In other words, not working properly<BR><BR>Heres my code: (still a jscript rookie) <BR>function layerWrite(index) {<BR><BR> var listObj = document.forms[&#039frmUserRequest&#039].elements[&#039selRegion1&#039];<BR><BR> emptyArray = new Array(1);<BR> americaArray = new Array(26);<BR> emeaArray = new Array(12);<BR> asiaArray = new Array(3);<BR><BR>**// i populate the arrays here (left out)** <BR><BR> if (index == 1){<BR> <BR> for (var i = 0; i &#060; americaArray.length; i++){<BR> listObj.options[i] = new Option(americaArray[i]);<BR> }<BR> } else if (index == 2){<BR> for (var i = 0; i &#060; emeaArray.length; i++){<BR> listObj.options[i] = new Option(emeaArray[i]);<BR> }<BR> } else if (index == 3){<BR> for (var i = 0; i &#060; asiaArray.length; i++){<BR> listObj.options[i] = new Option(asiaArray[i]);<BR> }<BR> } else if (index == 0){<BR> for (var i = 0; i &#060; emptyArray.length; i++){<BR> listObj.options[i] = new Option(emptyArray[i]);<BR> }<BR> }<BR> <BR> listObj.options[0].selected = true;<BR> //if (navigator.appName == "Netscape"){<BR> // history.go(0);<BR> //}<BR>}<BR><BR>Where &#039index&#039 is the selectedIndex of the other select box

  2. #2
    Join Date
    Dec 1969

    Default RE: Dynamically filling selectbox contents

    Netscape doesn&#039t support this functionality at all. The new version will, but the old 4.x version is SeaMonkeys(promises much, ultimately diappointing)<BR><BR>j

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts