swatisonee Posted May 3, 2013 Share Posted May 3, 2013 Hi, My web hosting co. upgraded to php 3.4.11.1 . I was using My Datepicker from rainforest.net http://www.rainforestnet.com/datetimepicker/datetimepicker.htm and all of sudden it just doesn't work. It has worked so beautifully all these years - I have never even customised it and all of sudden I cannot figure out why Newcsscal isn't getting called. Here is the part that I use . Any pointers on what could be going wrong and what I need to do ? Thank You ! <head> <meta http-equiv=Content-Type content="text/html; charset=windows-1252"> <title>Contacts</title> <link type="text/css" rel="stylesheet" href="NEWDBS/cssfiles/leave.css"> //<script src="./datepicker/datetimepicker_css.js"></script> // per the script creator it should be in the head but since we're calling the form, I would have it called in the body below </head> <body bgcolor=white lang=EN-IN link=blue vlink=purple> <div class=Section1> <div align=center> <form action="<?php print $PHP_SELF ?>" method="post"> <input type="hidden" name="userid" value="<? echo $userid ?>"> <input type="hidden" name="usertype" value="<? echo $usertype ?>"> <?php } else { ?> <FORM METHOD=post ACTION="<? echo $PHP_SELF ?>"> <script src="./datepicker/datetimepicker_css.js"></script> blah blah.... <input type=text name="todate" size=12> <a href="javascript:NewCssCal('todate', 'yyyymmdd')"> <img src="./datepicker/images/cal.gif" width="16" height="16" alt="Pick a date"></a></span></p> Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/ Share on other sites More sharing options...
mac_gyver Posted May 3, 2013 Share Posted May 3, 2013 Newcsscal isn't getting called how do you know that? what is it doing and what do you expect it to do? Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1427910 Share on other sites More sharing options...
swatisonee Posted May 3, 2013 Author Share Posted May 3, 2013 Earlier when one clicked on the cal.gif icon ,the current month would appear and one could choose a date. Now clicking on the icon doesnt have the month's calender pop up. Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1427922 Share on other sites More sharing options...
swatisonee Posted May 4, 2013 Author Share Posted May 4, 2013 Ok, here's something I found out. The datepicker pops up, a date can be selected but the variable doesn't pass thru the form on submit when <input type=text id="todate" size=12> However, when <input type=text name="todate" size=12> the datepicker doesn't pop up nor does the date get selected. However, if one types the date in the input box, the variable passes thru the form and gets submitted. Why does the selection of id or name make a difference and how do I resolve this please? also, could this be an issue with javascript? thanks Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1428121 Share on other sites More sharing options...
swatisonee Posted May 4, 2013 Author Share Posted May 4, 2013 While on the subject, I know there are several datepickers around. Can someone recommend a real simple one please? I need to pick atleast 3-4 dates in one form and then have it pass in yyyy-mm-dd format to a MySQL database. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1428122 Share on other sites More sharing options...
mac_gyver Posted May 4, 2013 Share Posted May 4, 2013 that datepicker always required an id=' ... ' to work. Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1428125 Share on other sites More sharing options...
swatisonee Posted May 4, 2013 Author Share Posted May 4, 2013 So here is what I did. Turned on compatibility view for IE10. The original code started working in IE and FF but not Chrome. Seems to be a javascript issue as the error in Chrome is "cannot read property value or null" . What can I check to resolve this please? Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1428129 Share on other sites More sharing options...
Barand Posted May 4, 2013 Share Posted May 4, 2013 Datepicker needs id Passing variables from form needs name So <input type="text" id="todate" name="todate" size="12"> Quote Link to comment https://forums.phpfreaks.com/topic/277569-datapicker-not-working-post-php-upgrade/#findComment-1428148 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.