I have searched through the forum for the answer to my problem but i am pissed off and tired and I can't find the answer. Can someone please answer my question.
I have a select box and using the onchange event I want to pass the index of the selected item to a function but I can't do it.
I have tried:
onChange="return test(this.index)"
onChange="return test(this.selected.index)"
onChange="return test(this.options.selected.index)"
Someone please tell me the right way to do this. The first one above gives me "undefined" while the other two just give errors. Mise Le Meas,
Mighty
I have a select box and using the onchange event I want to pass the index of the selected item to a function but I can't do it.
I have tried:
onChange="return test(this.index)"
onChange="return test(this.selected.index)"
onChange="return test(this.options.selected.index)"
Someone please tell me the right way to do this. The first one above gives me "undefined" while the other two just give errors. Mise Le Meas,
Mighty