joshgarrod Posted April 17, 2012 Share Posted April 17, 2012 Hi all, I am trying to get a popup javascript calendar working on my form. I have the demo working perfectly on my machine but when i try and add to my site and test in IE I click on the calenndar icon which calls the function to start the calendar and nothing happens. in the bottom corner of IE it informs me there are errors on the page. The error is that "Object Require calendar.js". The script is being sourced in the header of my page at the correct location... any ideas as to where I am going wrong? Thanks in advance: <head> <script language="javaScript" type="text/javascript" src="js/calendar.js"></script> <link href="css/calendar.css" rel="stylesheet" type="text/css"> </head> <form name="fa" action="add-calendar-date.php" method="POST" enctype="multipart/form-data"> <div class="field-hold"> <div class="field-name">Calendar Date Title:</div> <div class="field"><input name="title" type="text" id="title" value="" size="60" /> </div></div> <div class="field-hold"> <div class="field-name">Calendar Date Description:</div> <div class="field"><textarea name="description" cols="45" rows="10" id="description" type="text" value="" /></textarea></div></div> <div class="field-hold"> <div class="field-name">Start Date:</div> <div class="field"><input name="startdate" type="text" id="startdate" value="" size="30" /> <a href="#" onClick="setYears(2011, 2020); showCalender(this, 'startdate');"><img src="images/calendar.png" border="0"></a> </div></div> <div class="field-hold"> <div class="field-name">End Date:</div> <div class="field"><input name="enddate" type="text" id="enddate" value="" size="30" /> <a href="#" onClick="setYears(2011, 2020); showCalender(this, 'enddate');"><img src="images/calendar.png" border="0"></a> </div></div> <div class="field-hold"> <div class="field-name">Start Time:</div> <div class="field"><input name="starttime" type="text" id="starttime" value="" size="30" /> </div></div> <div class="field-hold"> <div class="field-name">End Time:</div> <div class="field"><input name="endtime" type="text" id="endtime" value="" size="30" /> </div></div> <div class="field-hold"> <div class="field-name">Author:</div> <div class="field"><input name="author" type="text" id="author" value="" size="30" /> </div></div> <input name="submit" type="submit" value="Add Calendar Date" /> </form> Quote Link to comment https://forums.phpfreaks.com/topic/261090-javascript-calendar-object-required-error/ 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.