I’m running this script [url]http://www.nsftools.com/tips/DatePickerTest.htm
on a php page, and in Firefox its fine, but in IE I get a “null” is null or not an object error right around here:
[code=php]function updateDateField(dateFieldName, dateString)
{
var targetDateField = document.getElementsByName (dateFieldName).item(0);
if (dateString) {
targetDateField.value = dateString;
}
var pickerDiv = document.getElementById(datePickerDivID);
pickerDiv.style.visibility = “hidden”;
pickerDiv.style.display = “none”;
adjustiFrame();
targetDateField.focus();
// after the datepicker has closed, optionally run a user-defined function called
// datePickerClosed, passing the field that was just updated as a parameter
// (note that this will only run if the user actually selected a date from the datepicker)
if ((dateString) && (typeof(datePickerClosed) == “function”)) {
datePickerClosed(targetDateField);
}
}