Hi, this JS issue is driving me crazy, any reasons why i can't get the select index value of a dropDown:
dobMonth.Attributes.Add("onchange", "alert(document.forms[0].dobYear.value);alert(this.value);alert(document.getElementById('dobDay').options[document.getElementById('dobDay').selectedIndex].value);");
I get the first alert, the second alert, but not the third alert ...?
Besides:
document.getElementById('dobDay').options[document.getElementById('dobDay').selectedIndex].value)
I've tried by associative array:
document.forms[0].dobDay.options[document.forms[0].dobDay.selectedIndex].value
I know the JS is good, so it must be a flaw in my thinking.. that i can access the value as such. How can this be accomplished?
Thanks
dobMonth.Attributes.Add("onchange", "alert(document.forms[0].dobYear.value);alert(this.value);alert(document.getElementById('dobDay').options[document.getElementById('dobDay').selectedIndex].value);");
I get the first alert, the second alert, but not the third alert ...?
Besides:
document.getElementById('dobDay').options[document.getElementById('dobDay').selectedIndex].value)
I've tried by associative array:
document.forms[0].dobDay.options[document.forms[0].dobDay.selectedIndex].value
I know the JS is good, so it must be a flaw in my thinking.. that i can access the value as such. How can this be accomplished?
Thanks