P
Prabhat
Hi All,
I have one .ASP file where a small java script is integrated and the output
does work in IE but not in FireFox or Opera 8.5. Please suggest.
Code:
<form name="test">
<select name="GraduationYr" >
<option value="-1"></option>
<script language="JavaScript">
var today= new Date();
var ayear = today.getYear();
for(i=ayear;i>1930;i--)
{
var newOptions = new Option();
newOptions.value = i;
newOptions.text = i;
document.all.GraduationYr.options[document.all.GraduationYr.options.length]
= newOptions;
if (i == 0)
document.all.GraduationYr.options[document.all.GraduationYr.options.length-1
].selected = true;
}
</script>
</select>
Thanks
Prabhat
I have one .ASP file where a small java script is integrated and the output
does work in IE but not in FireFox or Opera 8.5. Please suggest.
Code:
<form name="test">
<select name="GraduationYr" >
<option value="-1"></option>
<script language="JavaScript">
var today= new Date();
var ayear = today.getYear();
for(i=ayear;i>1930;i--)
{
var newOptions = new Option();
newOptions.value = i;
newOptions.text = i;
document.all.GraduationYr.options[document.all.GraduationYr.options.length]
= newOptions;
if (i == 0)
document.all.GraduationYr.options[document.all.GraduationYr.options.length-1
].selected = true;
}
</script>
</select>
Thanks
Prabhat