Ah yes... I did think you might run into problems with the way you had things, but figured to let sleeping dogs lie if they weren't causing you any problems. But since you bring the subject up:
Your Code:
[tt]
// First clear the current entries in the second combo box
for (count=document.caselog.proccode.options.length-1;count>0;count--){
document.caseLog.PROCCODE.options[count].text="";
}
[/tt]
Doesn't actually remove the options from the select. It merely deletes the text out of them. Similar to if you delete the text out of a dozen text files, you still have the empty shells sitting there.
The preferred way of cleaning out a select list:
[tt]
while(document.caselog.proccode.options.length != 0){
document.caseLog.PROCCODE.options[count] = null;
}
[/tt]
Similarly, the code:
[tt]
// Set first entry in the second combo, this is displayed initially
//document.caseLog.PROCCODE.options[0].text = "Select a Proc Code";
// Now loop through all the elements of the passed array to populate the second combo
for (count=0;count<mySitestext.length;count++){
document.caseLog.PROCCODE.options[count].text=mySitestext[count];
}
[/tt]
Doesn't actually create new options, it merely overwrites the text attributes of the options that are already there:
Preferred method:
[tt]
// Set first entry in the second combo, this is displayed initially
//document.caseLog.PROCCODE.options[0] = new Option("Select a Proc Code"

;
// Now loop through all the elements of the passed array to populate the second combo
for(var count=0;count<mySitestext.length;count++){
var insertionIndex = document.caseLog.PROCCODE.options.length;
document.caseLog.PROCCODE.options[insertionIndex] = new Option(mySitestext[count]);
}
[/tt]
Doing things this way will ensure that you only ever create the options that you need, rather than having to have a stack of empty options.
Never be afraid to share your dreams with the world.
There's nothing the world loves more than the taste of really sweet dreams.