Hi. I have been trying to make a javascript date-picker for my site. The HTML form is like this... <form name="myform" action="#" method="POST"> <div align="center"> <select name="myyear"> <option value="2013">2012</option> <option value="2013">2013</option> </select> <select name="mymonth"> <option value="01">Jan</option> <option value="02">Feb</option> <option value="03">Mar</option> </select> <select name="mydate"> <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> </select> <input type="submit" value="- Go -"> </div> </form> HTML: There is a form containing 3-dropdown boxes. dropdown "myyear" should have automatic +1 incremental "options" with the starting year as "2012". whereas the last "option" should be the current year. dropdown "mymonth" should have all 12 months as "options" as mentioned in the html file. dropdown "mydate" should have corresponding dates as "options" with related to the selected "month". plz consider here the leap year concept also. also ... If the selected month is the current month, then in the "mydate" dropdown, the last date should be the current date. and .... all the three dropdown/s should show the default [selected] value of current date. now, If a user select like this: year=2013 , month=sep , date=10 and then click the "Go" button, then it should go to the URL like this : Bold red-color digits are those, which are the ones as selected by the user. Can anyone here help me to achieve this concept? Thanks in advance.
What you should do is collect values from your select tags with javascript on button click and generate your target url from this data. Once you have generated correct url, assign this url to your action attribute on your form and submit form.