View Single Post
  #2 (permalink)  
Old August 16th, 2004, 01:02 AM
SoC SoC is offline
Authorized User
 
Join Date: Jul 2004
Location: , , .
Posts: 65
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Worked out how to do it.

Just need to add one line of code (bolded) to one of the functions:

Code:
function populateDynaList(oList, nIndex, aArray)

{

  oList.options[oList.options.length] = new Option("All","");

 for (var i = 0; i < aArray.length; i= i + 3){
 
 

  if (aArray[i] == nIndex){
   oList.options[oList.options.length] = new Option(aArray[i + 1], aArray[i + 2]);
  }
 }

 if (oList.options.length == 0){
  oList.options[oList.options.length] = new Option("[none available]",0);
 }
 
 oList.selectedIndex = 0;
}
SoC

Reply With Quote