<%@page import="java.util.Calendar"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>employee leave application</title>
<script src="EmpLeaveValidation.js" type="text/javascript"></script>
<style type="text/css">
#ehint {
position: absolute;
right: 230px;
top: 18px;
}
#cnhint {
position: absolute;
right: 200px;
top: 40px;
}
#chint {
position: absolute;
right: 200px;
top: 70px;
}
#rhint {
position: absolute;
right: 230px;
top: 110px;
}
#lhint {
position: absolute;
right: 180px;
top: 130px;
}
#ahint {
position: absolute;
right: 250px;
top: 160px;
}
#empalign{
position:absolute;
right:500px;
left:500px;
}
#fromdatealign{
position:absolute;
right:550px;
left:500px;
}
#fromdayalign{
position:absolute;
right:500px;
left:690px;
}
#fromyearalign{
position:absolute;
right:100px;
left:755px;
}
#todatealign{
position:absolute;
right:550px;
left:500px;
}
#todayalign{
position:absolute;
right:500px;
left:690px;
}
#toyearalign{
position:absolute;
right:100px;
left:755px;
}
#reasonalign{
position:absolute;
right:500px;
left:500px;
}
#leavealign{
position:absolute;
right:500px;
left:500px;
}
#approvalstatusalign{
position:absolute;
right:500px;
left:505px;
}
#submitalign{
position:absolute;
right:500px;
left:550px;
}
#resetalign{
position:absolute;
right:200px;
left:650px;
}
</style>
</head>
<body bgcolor="white">
<form action="Emp_Leave_Connector.jsp" name="f1" method="post"
onsubmit="return validateForm()">
<div id="empalign">
EmpId:
<input type="text" id="eid" name="empId">
</div>
<div id="ehint"></div><br><br>
<div id="fromdatealign">
From Date:
<select id="cname" name="fromDate">
<option value="0">select</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select>
</div>
<div id="fromdayalign"> <select id="cname" name="fromDay">
<option value="0">select</option>
<%
for (int j = 01; j < 31; j++) {
%>
<option value="<%=j %>"><%=j%></option>
<%
}
%>
</select></div>
<div id="fromyearalign"> <select id="cname" name="fromYear">
<option value="0">select</option>
<%
for (int i = 2010; i <= 2020; i++) {
%>
<option value="<%=i %>"><%=i%></option>
<%
}
%>
</select>
</div>
<div id="cnhint"></div><br><br>
<div id="todatealign">
ToDate:
<select id="chvalue" name="toDate">
<option value="0">select</option>
<option value="1">January</option>
<option value="2">February</option>
<option value="3">March</option>
<option value="4">April</option>
<option value="5">May</option>
<option value="6">June</option>
<option value="7">July</option>
<option value="8">August</option>
<option value="9">September</option>
<option value="10">October</option>
<option value="11">November</option>
<option value="12">December</option>
</select> </div>
<div id="todayalign"><select id="chvalue" name="toDay">
<option value="0">select</option>
<%
for (int k = 1; k < 31; k++) {
%>
<option value="<%=k %>"><%=k%></option>
<%
}
%>
</select>
</div>
<div id="toyearalign"><select id="chvalue" name="toYear">
<option value="0">select</option>
<%
for (int i = 2010; i <= 2020; i++) {
%>
<option value="<%=i %>"><%=i%></option>
<%
}
%>
</select>
</div>
<div id="chint"></div><br><br>
<div id="reasonalign">
Reason:
<input type="text" id="rvalue" name="reason">
</div>
<div id="rhint"></div><br><br>
<div id="leavealign">
LeaveType:
<select id="ltype" name="leaveType">
<option value="choose">choose</option>
<option value="general">general</option>
<option value="sick">sick</option>
<option value="earned leave">earned leave</option>
</select>
</div>
<div id="lhint"></div><br><br>
<div id="approvalstatusalign">
Approval<br>Status:
<input type="radio" id="avalue" name="approvalStatus"
value="pending">pending <input type="radio" id="a1value"
value="approved" name="approvalStatus" value="approved">approved
<input type="radio" id="a2value" value="rejected"
name="approvalStatus" value="rejected">rejected</td>
</div>
<div id="ahint"></div><br><br><br>
<div id="submitalign"> <input type="submit" value="submit"></div>
<div id="resetalign"><input type="reset" value="reset"></div>
</form>
</body>
</html>
how can i change the days in the days field automatically when the user selects a month...can anyone guide me