599Chapter 26 .Select, Option, (Post office web site) and FileUpload Objects listObj.remove(i)
599Chapter 26 .Select, Option, and FileUpload Objects listObj.remove(i) listObj.add(newOpt, listObj.options[i]) } listObj.selectedIndex = currSelected } } // create entirely new options list function setCount(choice) { var listObj = document.forms[0].colors var newOpt // filter out old browsers if (listObj.type) { // get language setting var lang = (document.forms[0].geekLevel[0].checked) ? plain : hard // empty options from list while (listObj.options.length) { listObj.remove(0) } // create new option object for each entry for (var i = 0; i < choice.value; i++) { newOpt = document.createElement( OPTION ) newOpt.text = (lang == plain ) ? plainList[i] : hardList[i] listObj.add(newOpt, null) } listObj.options[0].selected = true } } As with the IE version, the W3C version offers no specific benefit over the origi nal, backward-compatible approach. Choose the most modern one that fits the types of browsers you need to support with your page. Properties length Value: Integer Read/Write (see text) NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . . . Like all JavaScript arrays, the options array has a length property of its own. But rather than having to reference the options array to determine its length, the SELECT object has its own length property that you use to find out how many items are in the list. This value is the number of options in the object. A SELECT object with three choices in it has a length property value of 3. SELECT.length
You need excellent and relaible webhost company to host your web applications? Then pay a visit to Inexpensive Web Hosting services.