Hi - have googled this but cant find something that works for me.
Have a dynamic select that put optgroups in - which works fine, but before building the list it has to clear out existing options
(obj = this.form.selectbox)
this doesnt clear optgroups - can someone advise plz?
Have a dynamic select that put optgroups in - which works fine, but before building the list it has to clear out existing options
Code:
for (var i = obj.length-1; i > 0; i--) {
obj.options[i] = null;
}
this doesnt clear optgroups - can someone advise plz?