Hello guys i have doubt regarding javascript,here i am embedding javascript code in to html code,i tried this code this is working fine on Netscape and Firefox but it is not working on IE7 can u any body please rectify this problem please......
[HTML] <html> <head>
<title>Minimal Input</title>
<script type="text/javascript">
function changedays(x) {
var y=x;
var variable1=document.getElementById("3");
var variable2=document.getElementById("4");
if(y == "February"){
variable1.style.display="block";
variable2.style.display="block";
}
else{
variable1.style.display="none";
variable2.style.display="none";
}
}
</script>
</head>
<body bgcolor="lightgreen">
<p style="font-family:verdana;font-size:75%;color:red">
<center>
<p style="font-family:verdana;font-size:250%;color:red">
<b>Day/Weekly Activity Report</b>
</p>
<TABLE BORDER=0 cellspacing=20>
<center>
<b>Month:</b>
<select name="month" id="res" onchange="changedays(this.options[this.selectedIndex].value)">
<option value="january">January</option>
<option value="February">February</option>
<option value="March">March</option>
</select>
<b>Date:</b>
<select name ="fromdate" id="rest" >
<option id="1">1</option>
<option id="2">2</option>
<option id="3">3</option>
<option id="4">4</option>
</select>
<input type="submit" value="Submit">
</TABLE>
</body>
</html> [/HTML]
Thanks in advance.