I am using InfoPath 2003 w/SharePoint 2010. The template works last week but for some reason after the DST ended, I get this error message:
A run-time error has occurred.
Do you want to bug?
The following error occurred:
'undefined' is null or not an object
File: script.js
Line 32.
BTW, I only get the error message when I open an existing form. If I open a blank form, I dont get the error message.
Below is the code and line 32 is: var hour = now.getHours();
var oRows2;
var oSampleRow2;
function XDocument::OnLoad(eventObj)
{
oRows2 = XDocument.DOM.selectNodes("/my:myFields/my:StepFour/my:s4Table");
oSampleRow2 = oRows2.nextNode();
XDocument.DOM.selectSingleNode("/my:myFields/my:field54").text = "false";
if(XDocument.IsNew)
var now = new Date();
var hour = now.getHours(); //this is line 32
var minute = now.getMinutes();
var second = now.getSeconds();
var monthnumber = now.getMonth() + 1;
var monthday = now.getDate();
var year = now.getYear();
var oTimeStamp = monthnumber + " " + monthday + " " + year + " "+ hour + " " + minute + " " + second
XDocument.DOM.selectSingleNode("/my:myFields/my:TimeStamp").text = oTimeStamp;
}
Any help is greatly appreciated. Thank you.
Azu