My form code:
<form name="frm_term">
<select name="c_term" class="flyoutSubHeading"
<option>1st Semester, SY 2003-2004</option>
<option>2nd Semester, SY 2003-2004</option>
<option>1st Semester, SY 2004-2005</option>
<option>2nd Semester, SY 2004-2005</option>
</select>
</form>
my JavaScript code:
<SCRIPT language=JavaScript>
function sprex() {
var comboValue;
var selIndex = document.frm_term.c_term.selectedIndex;
comboValue = frm_term.c_term.options[selIndex].value;
return(comboValue);
}
</SCRIPT>
my problem: when i try to execute alert(sprex())
the javascript dont return any value..
can anybody tell me why?
thanks!
chris
<form name="frm_term">
<select name="c_term" class="flyoutSubHeading"
<option>1st Semester, SY 2003-2004</option>
<option>2nd Semester, SY 2003-2004</option>
<option>1st Semester, SY 2004-2005</option>
<option>2nd Semester, SY 2004-2005</option>
</select>
</form>
my JavaScript code:
<SCRIPT language=JavaScript>
function sprex() {
var comboValue;
var selIndex = document.frm_term.c_term.selectedIndex;
comboValue = frm_term.c_term.options[selIndex].value;
return(comboValue);
}
</SCRIPT>
my problem: when i try to execute alert(sprex())
the javascript dont return any value..
can anybody tell me why?
thanks!
chris