Hi all!
I am trying to get a JavaScript date selector to work for a front end I'm writing. I've seen a lot of problems related to JavaScript and IE vs. Firefox but I've yet to find a solution to my issue.
I have a simple form - when you click on the calendar image the calendar should pop up and allow you to select the date. IE invokes the javascript page and brings up the calendar just fine, but when I try the same in Firefox it doesn't work.
I eliminated all the extraneous stuff from my page - leaving just the input box and calendar selection - and still it works in IE and not Firefox. Here's that code:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Service statistics search</title>
<script type="text/javascript" src="datetimepicker_css.js"></script>
</head>
<body>
<table>
<input id="startdate" type="text" size="12">
<a href="javascript:NewCssCal('startdate','yyyymmdd')">
<img src="images/cal.gif" width="17" height="17" alt="Pick a start date"></a>
</table>
</body>
From the error console:
Error: NewCssCal is not defined
Source File: javascript:NewCssCal('startdate','yyyymmdd')
Line: 1
The calendar I'm using is from here:http://www.rainforestnet.com/datetimepicker.htm. I placed the test page they provided on my server - the same problem exists there too.
It seems that it just plain doesn't want to load the JavaScript page. Any ideas as to why? There must be something I'm missing or doing wrong.