<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Run Time Error</title><link>https://www.infopathdev.com:443/forums/thread/71915.aspx</link><pubDate>Wed, 09 Nov 2011 22:32:33 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71915</guid><dc:creator>AzuDaioh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71915.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=71915</wfw:commentRss><description>&lt;p&gt;Yup. It was missing the curly brackets. It&amp;#39;s always the curly brackets...thanks Jim!!!&lt;/p&gt;</description></item><item><title>Re: Run Time Error</title><link>https://www.infopathdev.com:443/forums/thread/71914.aspx</link><pubDate>Wed, 09 Nov 2011 22:25:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71914</guid><dc:creator>Jim Cantwell</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71914.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=71914</wfw:commentRss><description>&lt;p&gt;Can you double check that script code?&amp;nbsp; The if(XDocument.IsNew) doesn&amp;#39;t have a curly brace &amp;#39;{&amp;#39; and I would expect it to look more like this:&lt;/p&gt;&lt;p&gt;var oRows2;&lt;br /&gt;var oSampleRow2;&lt;/p&gt;&lt;p&gt;function XDocument::OnLoad(eventObj)&lt;br /&gt;{&lt;br /&gt; oRows2 = XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:StepFour/my:s4Table&amp;quot;);&lt;br /&gt; oSampleRow2 = oRows2.nextNode();&lt;br /&gt; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:field54&amp;quot;).text = &amp;quot;false&amp;quot;;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;if(XDocument.IsNew)&lt;/p&gt;&lt;p&gt;{ // Added left-curly brace&lt;br /&gt;&amp;nbsp;var now = new Date();&lt;br /&gt; var hour = now.getHours();  //this is line 32&lt;br /&gt; var minute = now.getMinutes();&lt;br /&gt;    var second = now.getSeconds();&lt;br /&gt;    var monthnumber = now.getMonth() + 1;&lt;br /&gt;    var monthday = now.getDate();&lt;br /&gt;    var year = now.getYear();&lt;br /&gt;    var oTimeStamp = monthnumber + &amp;quot; &amp;quot; + monthday + &amp;quot; &amp;quot; + year + &amp;quot; &amp;quot;+ hour + &amp;quot; &amp;quot; + minute + &amp;quot; &amp;quot; + second&lt;br /&gt; XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:TimeStamp&amp;quot;).text = oTimeStamp;&lt;/p&gt;&lt;p&gt;} // Added right-curly brace&lt;/p&gt;&lt;p&gt;}&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Run Time Error</title><link>https://www.infopathdev.com:443/forums/thread/71913.aspx</link><pubDate>Wed, 09 Nov 2011 22:15:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:71913</guid><dc:creator>AzuDaioh</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/71913.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=71913</wfw:commentRss><description>&lt;p&gt;I am using InfoPath 2003 w/SharePoint 2010.&amp;nbsp; The template works last week but for some reason after the DST ended, I get this error message:&lt;/p&gt;
&lt;p&gt;A run-time error has occurred. &lt;br /&gt;Do you want to bug? &lt;/p&gt;
&lt;p&gt;The following error occurred:&lt;/p&gt;
&lt;p&gt;&amp;#39;undefined&amp;#39; is null or not an object&lt;br /&gt;File: script.js&lt;br /&gt;Line 32.&lt;/p&gt;
&lt;p&gt;BTW, I only get the error message when I open an existing form.&amp;nbsp; If I open a blank form, I dont get the error message.&lt;/p&gt;
&lt;p&gt;Below is the code and line 32 is: var hour = now.getHours();&amp;nbsp; &lt;/p&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;var oRows2;&lt;br /&gt;var oSampleRow2;&lt;/p&gt;
&lt;p&gt;function XDocument::OnLoad(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;oRows2 = XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:StepFour/my:s4Table&amp;quot;);&lt;br /&gt;&amp;nbsp;oSampleRow2 = oRows2.nextNode();&lt;br /&gt;&amp;nbsp;XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:field54&amp;quot;).text = &amp;quot;false&amp;quot;;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;if(XDocument.IsNew)&lt;br /&gt;&amp;nbsp;var now = new Date();&lt;br /&gt;&amp;nbsp;var hour = now.getHours();&amp;nbsp; //this is line 32&lt;br /&gt;&amp;nbsp;var minute = now.getMinutes();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var second = now.getSeconds();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var monthnumber = now.getMonth() + 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var monthday = now.getDate();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var year = now.getYear();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var oTimeStamp = monthnumber + &amp;quot; &amp;quot; + monthday + &amp;quot; &amp;quot; + year + &amp;quot; &amp;quot;+ hour + &amp;quot; &amp;quot; + minute + &amp;quot; &amp;quot; + second&lt;br /&gt;&amp;nbsp;XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:TimeStamp&amp;quot;).text = oTimeStamp;&lt;br /&gt;}&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Any help is greatly appreciated. Thank you.&lt;/p&gt;
&lt;p&gt;Azu&lt;/p&gt;</description></item></channel></rss>