wobuck Posted December 17, 2010 Share Posted December 17, 2010 I have some code below but am unable to get the dates (date13 & date14) passed to a php file. <HTML> <HEAD> <TITLE>JavaScript Toolbox - Calendar Popup To Select Date</TITLE> <SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" ID="js13"> var cal13 = new CalendarPopup(); </SCRIPT> </HEAD> <BODY> <FORM NAME="example"> Start date and end date, with end date defaulting to same date as start date<BR> Start: <INPUT TYPE="text" NAME="date13" VALUE="" SIZE=25> <A HREF="#" onClick="cal13.select(document.forms[0].date13,'anchor13','dd/MM/yyyy'); return false;" TITLE="cal13.select(document.forms[0].date13,'anchor13','MM/dd/yyyy'); return false;" NAME="anchor13" ID="anchor13">select</A> End: <INPUT TYPE="text" NAME="date14" VALUE="" SIZE=25> <A HREF="#" onClick="cal13.select(document.forms[0].date14,'anchor14','dd/MM/yyyy',(document.forms[0].date14.value=='')?document.forms[0].date13.value:null); return false;" TITLE="cal13.select(document.forms[0].date14,'anchor14','MM/dd/yyyy',(document.forms[0].date14.value=='')?document.forms[0].date13.value:null); return false;" NAME="anchor14" ID="anchor14">select</A> </FORM> <form method="get" action="nextfile.php"> <input type="hidden" name="date13" size="12" value="date13""> <input type="hidden" name="date14" size="12" value="date14"> <input name="Submit1" type="submit" value="submit"></form> </BODY> </HTML> Any help appreciated Quote Link to comment Share on other sites More sharing options...
wobuck Posted December 18, 2010 Author Share Posted December 18, 2010 Problem Solved! Here is the code that works: <HTML> <HEAD> <TITLE>JavaScript Toolbox - Calendar Popup To Select Date</TITLE> <SCRIPT LANGUAGE="JavaScript" SRC="CalendarPopup.js"></SCRIPT> <SCRIPT LANGUAGE="JavaScript" ID="js13"> var cal13 = new CalendarPopup(); </SCRIPT> </HEAD> <BODY> <FORM NAME="example" method="get" action="nextfile.php"> Start date and end date, with end date defaulting to same date as start date<BR> Start: <INPUT TYPE="text" NAME="date13" VALUE="" SIZE=25> <A HREF="#" onClick="cal13.select(document.forms[0].date13,'anchor13','dd/MM/yyyy'); return false;" TITLE="cal13.select(document.forms[0].date13,'anchor13','MM/dd/yyyy'); return false;" NAME="anchor13" ID="anchor13">select</A> End: <INPUT TYPE="text" NAME="date14" VALUE="" SIZE=25> <A HREF="#" onClick="cal13.select(document.forms[0].date14,'anchor14','dd/MM/yyyy',(document.forms[0].date14.value=='')?document.forms[0].date13.value:null); return false;" TITLE="cal13.select(document.forms[0].date14,'anchor14','MM/dd/yyyy',(document.forms[0].date14.value=='')?document.forms[0].date13.value:null); return false;" NAME="anchor14" ID="anchor14">select</A> <input type="submit" name="submit" value="SUBMIT" class="red"> </FORM> </BODY> </HTML> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.