Hi,
I've been trying experiments with the following, but so far to no avail:
sel = document.getElementById('myComboBox')
sel.selectedIndex = 1;
sel.options[1].selected = true;
sel[1].click();
Thanks for the help!
Hi,
I've been trying experiments with the following, but so far to no avail:
sel = document.getElementById('myComboBox')
sel.selectedIndex = 1;
sel.options[1].selected = true;
sel[1].click();
Thanks for the help!
Wait why would you write:
sel.options[1].selected = true;
and then in the very next line write
sel[1].click();
?? The element is not an array and can't be treated as one.
The "click" event might not be the best thing to handle anyway. Probably the "change" event on the select element itself would be more reliable.