elecho Posted October 14, 2020 Share Posted October 14, 2020 Hi! I have an order program that worked for a long time in old version of IE. It works fine with other browsers such as chrome and safari. However, it does not work for the date picker for these browsers. I have the following script: </SELECT><BR> <INPUT TYPE="TEXT" NAME="cut_date" VALUE="<? echo htmlspecialchars(stripslashes($cut_date), ENT_QUOTES, 'BIG5'); ?>" SIZE="10" onBlur="dp_dateFormat='yyyy-mm-dd';magicDate(this)" onFocus="if (this.className != 'error') this.select()" onClick="g_Calendar.show(event,'cut_date', 'yyyy-mm-dd')" READONLY> </FORM> <? For IE, it works fine. For the other browsers, it return with Error: input field "cut_date" does not exist. What is the problem? How can I solve this problem? Many thanks! Top Quote Link to comment https://forums.phpfreaks.com/topic/311597-datepicker-error-with-browsers/ Share on other sites More sharing options...
mac_gyver Posted October 14, 2020 Share Posted October 14, 2020 (edited) you probably have some broken html, prior to that input field, due to the short opening php tags <? being used. when you do a 'view source' of the page in any of the browsers, do you see the raw php code or do you get the values that php is trying to echo onto the web page? Edited October 14, 2020 by mac_gyver Quote Link to comment https://forums.phpfreaks.com/topic/311597-datepicker-error-with-browsers/#findComment-1581867 Share on other sites More sharing options...
elecho Posted October 15, 2020 Author Share Posted October 15, 2020 Thank you Mac_gyver, When I view source from Edge. I got the following response: <INPUT TYPE="TEXT" NAME="cut_date" VALUE="2020-10-15" SIZE="10" onBlur="dp_dateFormat='yyyy-mm-dd';magicDate(this)" onFocus="if (this.className != 'error') this.select()" onClick="g_Calendar.show(event,'cut_date', 'yyyy-mm-dd')" READONLY> But when I click the date, it shows an Error: "Input field "cut_date" does not exist. Do you think that it is the problem of INPUT parameter setting or the datepicker script setting? Quote Link to comment https://forums.phpfreaks.com/topic/311597-datepicker-error-with-browsers/#findComment-1581897 Share on other sites More sharing options...
Barand Posted October 15, 2020 Share Posted October 15, 2020 Perhaps the datepicker script is looking for an input with id="cut_date" Quote Link to comment https://forums.phpfreaks.com/topic/311597-datepicker-error-with-browsers/#findComment-1581901 Share on other sites More sharing options...
mac_gyver Posted October 15, 2020 Share Posted October 15, 2020 1 hour ago, elecho said: it shows an Error it will probably take having all the code that's part of 'it' to be able to help. Quote Link to comment https://forums.phpfreaks.com/topic/311597-datepicker-error-with-browsers/#findComment-1581902 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.