Jump to content

datepicker error with browsers


elecho

Recommended Posts

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

Link to comment
Share on other sites

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 by mac_gyver
Link to comment
Share on other sites

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?

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.