Hi, I'm having problems with a form. It's a drop down date form which fills in the date for tomorrow, and then underneath in 7 days time. The form wont update the month correctly though at the end of the month. Instead of going to the next month (on say the 30th or 31st) it remains on the current month. The code is <select name="ddd" size="1"><script type="text/javascript"> var thedate = new Date(); thedate.setDate(thedate.getDate()+1); for(i=1;i<32;i++) { if(thedate.getDate() == i) { var selected = "selected"; } else { selected = ""; } if(i<10) { document.write('<option '+selected+' value="0'+i+'">0'+i+'</option>') } else { document.write('<option '+selected+' value="'+i+'">'+i+'</option>') } } </script> </select><select name="ddm" size="1"> <script type="text/javascript"> var longmonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var shortmonth = new Array("JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"); thedate = new Date(); thedate = DateAdd(thedate,7,0,0) themonth = thedate.getMonth(); theyear = thedate.getFullYear(); // always set current month to 1st of the month newdate = new Date(theyear, themonth, 1); for(i=0; i < 12; i++) { thedate = DateAdd(newdate,0,i,0); themonth = thedate.getMonth(); theyear = thedate.getFullYear(); theyear = theyear.toString(); themonthval=themonth+1; document.write('<option value="'+themonthval+'">'+longmonth[themonth]+'</option>'); } </script> </select><select name="ddy" size="1"> <script type="text/javascript"> thedate = new Date(); theyear = thedate.getFullYear(); // always set current month to 1st of the month newdate = new Date(theyear, themonth, 1); for(i=0; i < 12; i++) { thedate = DateAdd(newdate,0,0,i); theyear = thedate.getFullYear(); theyear = theyear.toString(); document.write('<option value="'+theyear+'">'+theyear+'</option>'); } </script> </select></td><td align=left class="bodya"><p>Drop-off time<br> <select name="dth"><option value="00">00</option><option value="01">01</option><option value="02">02</option><option value="03">03</option><option value="04">04</option><option value="05">05</option><option value="06" selected>06</option><option value="07">07</option><option value="08">08</option><option value="09">09</option><option value="10">10</option><option value="11">11</option><option value="12">12</option><option value="13">13</option><option value="14">14</option><option value="15">15</option><option value="16">16</option><option value="17">17</option><option value="18">18</option><option value="19">19</option><option value="20">20</option><option value="21">21</option><option value="22">22</option><option value="23">23</option></select><select name="dtm"><option value="00" selected>00</option><option value="10">10</option><option value="20">20</option><option value="30">30</option><option value="40">40</option><option value="50">50</option></select></td></tr><tr><td align=left class="bodya"><p>Returning<br> <select name="rdd" size="1"><script type="text/javascript"> thedate = new Date(); thedate = DateAdd(thedate,7,0,0); for(i=1;i<32;i++) { if(thedate.getDate() == i) { var selected = "selected"; } else { selected = ""; } if(i<10) { document.write('<option '+selected+' value="0'+i+'">0'+i+'</option>') } else { document.write('<option '+selected+' value="'+i+'">'+i+'</option>') } } </script> </select><select name="rdm" size="1"><script type="text/javascript"> var longmonth = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"); var shortmonth = new Array("JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"); thedate = new Date(); thedate = DateAdd(thedate,7,0,0) themonth = thedate.getMonth(); theyear = thedate.getFullYear(); // always set current month to 1st of the month newdate = new Date(theyear, themonth, 1); for(i=0; i < 12; i++) { thedate = DateAdd(newdate,0,i,0); themonth = thedate.getMonth(); theyear = thedate.getFullYear(); theyear = theyear.toString(); themonthval=themonth+1; document.write('<option value="'+themonthval+'">'+longmonth[themonth]+'</option>'); } </script> </select><select name="rdy"> <script type="text/javascript"> thedate = new Date(); theyear = thedate.getFullYear(); // always set current month to 1st of the month newdate = new Date(theyear, themonth, 1); for(i=0; i < 12; i++) { thedate = DateAdd(newdate,0,0,i); theyear = thedate.getFullYear(); theyear = theyear.toString(); document.write('<option value="'+theyear+'">'+theyear+'</option>'); } </script></select> Code (markup):