Hi

I've got a form with several dynamic dependent list boxes which is using the following javascript:

function populateDynaList(oList, nIndex, aArray){
oList[oList.length]= new Option("<-- Please select an option -->");
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;
}

My problem is that the 'none available' isnt working - which is causing me problems with the backend database. I presume I've missed something out of the function but for the life of me I can't figure it out!

Using: UD4, IIS, ASP, VScript mainly