LiveWire Web-to-Database Solutions, Part 2

By William Robert Stanek

Dr. Dobb's Sourcebook July/August 1997

function searchSize(choice) {
   var dataObj = document.forms[0].table
   var whichDB = (document.forms[0].detTable[0].
                  checked)?"customer":"employee"
   dataObj.length = 0
   for (var i = 0; i < choice.value; i++) {
      if (whichDB == "customer") {
         dataObj.options[i] = new Option(tableOne[i])
      } else {
         dataObj.options[i] = new Option(tableTwo[i])
      }
   }
   dataObj.options[0].selected = true
   history.go(0)
}

Example 7: Changing the size of the selection menus and repopulating.

Back to Article