[thelist] JavaScript: Accessing selectedIndex
Tab Alleman
talleman at autobex.com
Fri Nov 3 12:54:29 CST 2000
In the body of my page, I have the following form element:
<select name='DReviewMonth' size='1' onchange=DateModify('DReviewMonth')>
...
Ok, then in my script, the beginning of DateModify() goes like this:
function DateModify(TheSelect)
{
alert(TheSelect + " - " + TheSelect.length + " - " +
TheSelect.selectedIndex);
...
HOWEVER, when I change the select box, the resulting alert box displays:
DReviewMonth - 12 - undefined
Why? Why is it accessing the .length property as advertised, but not the
selectedIndex property? I don't see anything wrong with my script.. does
anybody?
More information about the thelist
mailing list