larissahn Posted May 30, 2009 Share Posted May 30, 2009 hello, I created a php form. http://www.utilaecology.org/research/lionfish_contact.php I want the user to be able to select the date from a calendar, but I've had so many problems. http://www.rainforestnet.com/datetimepicker.htm this is the code for the form up until the date text field. <?php include('../includes/core.php'); layout_start(true); ?> <style type="text/css"> <!-- .Estilo3 {font-size: 12px} --> </style> <script type="text/javascript" src="datetimepicker_css.js"></script> <table width="599" border="0" cellspacing="4" cellpadding="5"> <tr> <td width="567" height="28" background="../assets/images/section-bkgd_long.gif" class="SectionText">Report lionfish sighting</td> </tr> <tr> <td><p align="justify">Please fill in the form below if you would like to report a lionfish sighting and we will get back to you as soon as possible. </p> <hr size="1" noshade="noshade" /></td> </tr> <tr> <td><form name="LionfishContactForm" method="post" action="sendmail.php"> <table width="100%" border="0"> <tr> <td><div align="left"> <label>Name:</label> </div></td> <td><input name="name" type="text" id="name" size="60" maxlength="30"></td> </tr> <tr> <td><div align="left"> <label>Email:</label> </div></td> <td><input name="email" type="text" id="email" size="60" maxlength="30"></td> </tr> <tr> <td><label>Date:</label> </td> <td><input name="date" type="text" id="date" size="35"> <img src="../assets/images/cal.gif" alt="Pick a date"> </tr> Link to comment https://forums.phpfreaks.com/topic/160304-problem-with-datepicker-from-rainforestnet/ Share on other sites More sharing options...
DarkSuperHero Posted May 31, 2009 Share Posted May 31, 2009 i think you need to read the documentation a tad more in detail...try this... <?php include('../includes/core.php'); layout_start(true); ?> <style type="text/css"> <!-- .Estilo3 {font-size: 12px} --> </style> <script type="text/javascript" src="datetimepicker_css.js"></script> <table width="599" border="0" cellspacing="4" cellpadding="5"> <tr> <td width="567" height="28" background="../assets/images/section-bkgd_long.gif" class="SectionText">Report lionfish sighting</td> </tr> <tr> <td><p align="justify">Please fill in the form below if you would like to report a lionfish sighting and we will get back to you as soon as possible. </p> <hr size="1" noshade="noshade" /></td> </tr> <tr> <td><form name="LionfishContactForm" method="post" action="sendmail.php"> <table width="100%" border="0"> <tr> <td><div align="left"> <label>Name:</label> </div></td> <td><input name="name" type="text" id="name" size="60" maxlength="30"></td> </tr> <tr> <td><div align="left"> <label>Email:</label> </div></td> <td><input name="email" type="text" id="email" size="60" maxlength="30"></td> </tr> <tr> <td><label>Date:</label> </td> <td><input name="date" type="text" id="date" size="35"> <a href="javascript:NewCssCal('demo1')"> <img src="../assets/images/cal.gif" alt="Pick a date"></a> </tr> looks like you are including the js file required..should all work out fine now... Cheers! Link to comment https://forums.phpfreaks.com/topic/160304-problem-with-datepicker-from-rainforestnet/#findComment-846026 Share on other sites More sharing options...
larissahn Posted May 31, 2009 Author Share Posted May 31, 2009 hi, I made the changes you suggested, but it still doesn't work. there is no popup, just an error. this is the new code: <?php include('../includes/core.php'); layout_start(true); ?> <style type="text/css"> <!-- .Estilo3 {font-size: 12px} --> </style> <script type="text/javascript" src="datetimepicker_css.js"></script> <table width="599" border="0" cellspacing="4" cellpadding="5"> <tr> <td width="567" height="28" background="../assets/images/section-bkgd_long.gif" class="SectionText">Report lionfish sighting</td> </tr> <tr> <td><p align="justify">Please fill in the form below if you would like to report a lionfish sighting and we will get back to you as soon as possible. </p> <hr size="1" noshade="noshade" /></td> </tr> <tr> <td><form name="LionfishContactForm" method="post" action="sendmail.php"> <table width="100%" border="0"> <tr> <td><div align="left"> <label>Name:</label> </div></td> <td><input name="name" type="text" id="name" size="60" maxlength="30"></td> </tr> <tr> <td><div align="left"> <label>Email:</label> </div></td> <td><input name="email" type="text" id="email" size="60" maxlength="30"></td> </tr> <tr> <td><label>Date:</label> </td> <td><input name="date" type="text" id="date" size="35"> <a href="javascript:NewCssCal('demo1')"> <img src="../assets/images/cal.gif" alt="Pick a date"></a> </tr> <tr> <td><div align="left"> of course, there are other fiels after the date. but they are not important, I think? I have uploaded all the files needed to the server. there is no html head, because I'm calling a function that stores the template of my site. I'm really not sure where the problem is. thanks! Link to comment https://forums.phpfreaks.com/topic/160304-problem-with-datepicker-from-rainforestnet/#findComment-846105 Share on other sites More sharing options...
DarkSuperHero Posted May 31, 2009 Share Posted May 31, 2009 <?php include('../includes/core.php'); layout_start(true); ?> <style type="text/css"> <!-- .Estilo3 {font-size: 12px} --> </style> <script type="text/javascript" src="datetimepicker_css.js"></script> <table width="599" border="0" cellspacing="4" cellpadding="5"> <tr> <td width="567" height="28" background="../assets/images/section-bkgd_long.gif" class="SectionText">Report lionfish sighting</td> </tr> <tr> <td><p align="justify">Please fill in the form below if you would like to report a lionfish sighting and we will get back to you as soon as possible. </p> <hr size="1" noshade="noshade" /></td> </tr> <tr> <td><form name="LionfishContactForm" method="post" action="sendmail.php"> <table width="100%" border="0"> <tr> <td><div align="left"> <label>Name:</label> </div></td> <td><input name="name" type="text" id="name" size="60" maxlength="30"></td> </tr> <tr> <td><div align="left"> <label>Email:</label> </div></td> <td><input name="email" type="text" id="email" size="60" maxlength="30"></td> </tr> <tr> <td><label>Date:</label> </td> <td><input name="date" type="text" id="date" size="35"> <a href="javascript:NewCssCal('date')"> <!--change this line--> <img src="../assets/images/cal.gif" alt="Pick a date"></a> </tr> <tr> <td><div align="left"> ooops....forgot one small change...try now... :-) Link to comment https://forums.phpfreaks.com/topic/160304-problem-with-datepicker-from-rainforestnet/#findComment-846417 Share on other sites More sharing options...
larissahn Posted May 31, 2009 Author Share Posted May 31, 2009 you are an angel! thank u so much! can u tell me of a simple way to validate the email, please? many thanks. Link to comment https://forums.phpfreaks.com/topic/160304-problem-with-datepicker-from-rainforestnet/#findComment-846458 Share on other sites More sharing options...
DarkSuperHero Posted June 1, 2009 Share Posted June 1, 2009 regular expressions are your friend.... :-) google: regular expression, javascript, email http://www.google.com/search?rlz=1C1GGLS_enUS317US317&sourceid=chrome&ie=UTF-8&q=regular+expression,+javascript,+email cheers! Link to comment https://forums.phpfreaks.com/topic/160304-problem-with-datepicker-from-rainforestnet/#findComment-846526 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.