Can someone PLEASE HELP. The Javascript works perfectly in FF but not in IE.
CODE
<!DOCTYPE HTML PUBlIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>NAC Memeber No. Search</title>
<style type="text/css">
.hide { display:none; }
</style>
<script type="text/javascript">
function populate(inForm)
{
var temp=0;
var today= new Date();
var day= today.getDate();
var month= today.getMonth();
var year= today.getFullYear();
t2 = 50;
for (var i=0; i <31 ; i++)
{
var x= String(i+1);
inForm.day.options = new Option(x,x);
}
for (var i=0; i <31 ; i++)
{
var d=0;
d=inForm.day.options.value;
if(d==day)
{
inForm.day.options.selected=true;
break;
}
}
for (var i=0,j=year; i <t2 ; i++, j--)
{
var y= String(j);
inForm.year.options = new Option(y,y);
}
for(var i=0;i<12;i++)
{
if(i==month)
{
inForm.month.options.selected=true;
break;
}
}
}
function populate2(inForm2)
{
var t3=0;
if (inForm2.month.options[1].selected)
t3=28;
else if(inForm2.month.options[8].selected || inForm2.month.options[3].selected || inForm2.month.options[5].selected || inForm2.month.options[10].selected)
t3=30;
else
t3=31;
for(i=0;i<31;i++)
{
inForm2.day.options=null;
}
for (var i=0; i <t3 ; i++)
{
var x= String(i+1);
inForm2.day.options = new Option(x);
}
}
</script>
<style type="text/css">
<!--
.style1 {
color: #000099;
font-weight: bold;
}
.style2 {color: #FF0000}
-->
</style>
</head>
<body onLoad=populate(document["form1"])>
<div align="center" class="style1">
<div align="center">NAC Member Number Search</div>
</div>
<br>
<div align="left">Select your Date of Birth below and enter your First Name and Last Name to search for your NAC Member No.</div>
<form name='form1' action='process_form.php' method='POST'>
<table class='table_form_1' id='table_form_1' cellspacing='0'>
<tr>
<p>
<b>Year</b><SELECT NAME="year"></SELECT>
<b>Month</b> <SELECT NAME="month" onChange = populate2(form1)>
<Option value=1>01</Option>
<Option value=2>02</Option>
<Option value=3>03</Option>
<Option value=4>04</Option>
<Option value=5>05</Option>
<Option value=6>06</Option>
<Option value=7>07</Option>
<Option value=8>08</Option>
<Option value=9>09</Option>
<Option value=10>10</Option>
<Option value=11>11</Option>
<Option value=12>12</Option>
</SELECT>
<b>Day</b> <SELECT NAME="day"></SELECT>
</FORM>
</td>
</tr>
<tr>
<td class='ftbl_row_2' ><LABEL for='firstName' ACCESSKEY='none' ><b style='color:red'>*</b>First Name
</td>
<td class='ftbl_row_2a' ><input type='text' name='firstName' id='firstName' size='20' value=''>
</td>
</tr>
<tr>
<td class='ftbl_row_1' ><LABEL for='lastName' ACCESSKEY='none' ><b style='color:red'>*</b>Last Name
</td>
<td class='ftbl_row_1a' ><input type='text' name='lastName' id='lastName' size='45' value=''>
</td>
</tr>
<tr>
<td colspan='2' align='right'><input type='submit' name='submit' value='Submit'> <input type='reset' name='reset' value='Reset'><br /><a</a>
</td>
</tr>
</table>
</form>
</body>
</html>
CODE
<!DOCTYPE HTML PUBlIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<html>
<head>
<title>NAC Memeber No. Search</title>
<style type="text/css">
.hide { display:none; }
</style>
<script type="text/javascript">
function populate(inForm)
{
var temp=0;
var today= new Date();
var day= today.getDate();
var month= today.getMonth();
var year= today.getFullYear();
t2 = 50;
for (var i=0; i <31 ; i++)
{
var x= String(i+1);
inForm.day.options = new Option(x,x);
}
for (var i=0; i <31 ; i++)
{
var d=0;
d=inForm.day.options.value;
if(d==day)
{
inForm.day.options.selected=true;
break;
}
}
for (var i=0,j=year; i <t2 ; i++, j--)
{
var y= String(j);
inForm.year.options = new Option(y,y);
}
for(var i=0;i<12;i++)
{
if(i==month)
{
inForm.month.options.selected=true;
break;
}
}
}
function populate2(inForm2)
{
var t3=0;
if (inForm2.month.options[1].selected)
t3=28;
else if(inForm2.month.options[8].selected || inForm2.month.options[3].selected || inForm2.month.options[5].selected || inForm2.month.options[10].selected)
t3=30;
else
t3=31;
for(i=0;i<31;i++)
{
inForm2.day.options=null;
}
for (var i=0; i <t3 ; i++)
{
var x= String(i+1);
inForm2.day.options = new Option(x);
}
}
</script>
<style type="text/css">
<!--
.style1 {
color: #000099;
font-weight: bold;
}
.style2 {color: #FF0000}
-->
</style>
</head>
<body onLoad=populate(document["form1"])>
<div align="center" class="style1">
<div align="center">NAC Member Number Search</div>
</div>
<br>
<div align="left">Select your Date of Birth below and enter your First Name and Last Name to search for your NAC Member No.</div>
<form name='form1' action='process_form.php' method='POST'>
<table class='table_form_1' id='table_form_1' cellspacing='0'>
<tr>
<p>
<b>Year</b><SELECT NAME="year"></SELECT>
<b>Month</b> <SELECT NAME="month" onChange = populate2(form1)>
<Option value=1>01</Option>
<Option value=2>02</Option>
<Option value=3>03</Option>
<Option value=4>04</Option>
<Option value=5>05</Option>
<Option value=6>06</Option>
<Option value=7>07</Option>
<Option value=8>08</Option>
<Option value=9>09</Option>
<Option value=10>10</Option>
<Option value=11>11</Option>
<Option value=12>12</Option>
</SELECT>
<b>Day</b> <SELECT NAME="day"></SELECT>
</FORM>
</td>
</tr>
<tr>
<td class='ftbl_row_2' ><LABEL for='firstName' ACCESSKEY='none' ><b style='color:red'>*</b>First Name
</td>
<td class='ftbl_row_2a' ><input type='text' name='firstName' id='firstName' size='20' value=''>
</td>
</tr>
<tr>
<td class='ftbl_row_1' ><LABEL for='lastName' ACCESSKEY='none' ><b style='color:red'>*</b>Last Name
</td>
<td class='ftbl_row_1a' ><input type='text' name='lastName' id='lastName' size='45' value=''>
</td>
</tr>
<tr>
<td colspan='2' align='right'><input type='submit' name='submit' value='Submit'> <input type='reset' name='reset' value='Reset'><br /><a</a>
</td>
</tr>
</table>
</form>
</body>
</html>