Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8252899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:41:24+00:00 2026-06-08T00:41:24+00:00

I have a javascript datetimepicker that works well with everything except IE7 or above.

  • 0

I have a javascript datetimepicker that works well with everything except IE7 or above. The issue seems to be with getElementById. Here is how current code looks:

<tr>
 <td style="width: 143px">Call Date:
 </td>
<td style="width: 472px">
<input type="Text" name=cdate size=40 style="color: black;background-color:#FFFF66; width: 270px;">
<a href="javascript:NewCal('cdate','ddmmyyyy')"><img src="cal.gif" width="16" height="16" border="0" alt="Pick a date"></a>
</td>
</tr>

In IE7 or above this will not work. I get “Javascript error object missing”. If I change name=cdate to id=cdate it works but but when I submit the form to my php insert:

<?
$cdate=$_POST['cdate'];

The submission fails. So how can I correct this or how can I make the id= element be by name= element ….hope this makes sense.

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:41:26+00:00Added an answer on June 8, 2026 at 12:41 am

    You can use both name and id so server will get the name and you can use id on the client side

    <input type="Text" name="cdate" id="cdate" size="40" style="color: black;background-color:#FFFF66; width: 270px;" />
    

    So you can use on the server side

    $cdate=$_POST['cdate']; // because it has name="cdate"
    

    and on the ckient side you can use

    var cdate=getElementById('cdate'); // Because it has id="cdate"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a javascript datetimepicker that I downloaded online which I use to select
I have Javascript code that does this: var oObjchbox = document.getElementById(CheckBox_ + countyId); The
I have Javascript function that is adding css class current to selected link <a>
I have Javascript that opens another window and registers a click handler for all
I have JavaScript that is doing activity periodically. When the user is not looking
I have javascript string variable with var sttr=We prefer questions that can be answered
I have JavaScript which performs a whole lot of calculations as well as reading/writing
We have javascript files that are environment specific, and so I was thinking of
I have JavaScript that computes and injects HTML into my DOM for the Facebook
I have javascript code that uses velocity context and rundata objects, I have to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.