this is follow up to thread216-1121894
I needed to dynamically clear a drop down before re-ajaxing the results and ran into this same issue. setting options to null in a for loop has some issues. looks like this previous thread decided that a decrementing for loop worked okay, but this is even simpler:
while($('fm_QueuesDropDown').options.length > 0) {
$('fm_QueuesDropDown').options[0] = null;
}
the problem with the [forward] for loop is it gets rid of the first (0) option first and then gets a bit confused. using the while loop alleviates keeping track of any order of the options.
-williambq
wbq dot us
chiptard dot com
I needed to dynamically clear a drop down before re-ajaxing the results and ran into this same issue. setting options to null in a for loop has some issues. looks like this previous thread decided that a decrementing for loop worked okay, but this is even simpler:
while($('fm_QueuesDropDown').options.length > 0) {
$('fm_QueuesDropDown').options[0] = null;
}
the problem with the [forward] for loop is it gets rid of the first (0) option first and then gets a bit confused. using the while loop alleviates keeping track of any order of the options.
-williambq
wbq dot us
chiptard dot com