I've got some problem on JavaScript in here...
This is my script :
<HTML>
<HEAD>
<TITLE>---</TITLE>
<script TYPE="text/javascript">
function days(x)
{
var number = new Array("31","29","30");
temp2 = number[x];
document.write("<SELECT>");
for(i=1;i<=temp2;i++)
{
document.write("<OPTION VALUE=" + i + ">" + i + "</OPTION>");
}
document.write("</SELECT>");
}
</SCRIPT>
</HEAD>
<BODY>
<FORM>
<SELECT NAME="months" onChange="days(months.options[months.selectedIndex].value)">
<OPTION VALUE="default" SELECTED>--Month--</OPTION>
<script TYPE="text/javascript">
var month = new Array("January","February","March");
for(i=0;i<3;i++)
{
document.write("<OPTION VALUE=" + i + ">" + month[i] + "</OPTION>");
}
</SCRIPT>
</SELECT>
</FORM>
</BODY>
</HTML>
My Algorithm is :
1. When I select some a month, and will display a selection day for month based on the month I select in month selection. For example, If I select January and the days from 1 to 31, if i select February and the days from 1 to 29/28, etc.
2. But position display of days selection is beside of month selection. In this script, when i pick a month, the month selection stricken by days selection...
Thank you very much...
