<?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: Expected ';' Error</title><link>https://www.infopathdev.com:443/forums/thread/39823.aspx</link><pubDate>Mon, 23 Mar 2009 02:12:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39823</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39823.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=39823</wfw:commentRss><description>&lt;p&gt;The code you borrowed is VBScript code, but your form is set for JScript.&lt;/p&gt;</description></item><item><title>Expected ';' Error</title><link>https://www.infopathdev.com:443/forums/thread/39822.aspx</link><pubDate>Mon, 23 Mar 2009 02:06:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:39822</guid><dc:creator>Brett_2222</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/39822.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=39822</wfw:commentRss><description>&lt;p&gt;I copied this code from another post, and I&amp;#39;m now getting this error:&lt;/p&gt;
&lt;p&gt;Expected &amp;#39;;&amp;#39;&lt;br /&gt;File:script.js&lt;br /&gt;Line:38&lt;br /&gt;Sub updateDateDiff&lt;/p&gt;
&lt;p&gt;Can you help?&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s the code:&lt;/p&gt;
&lt;p&gt;function msoxd_my_Date2::OnAfterChange(eventObj) &lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;if (eventObj.IsUndoRedo) &lt;br /&gt;{&amp;nbsp;&lt;br /&gt;return; &lt;br /&gt;} &lt;br /&gt;Sub updateDateDiff &lt;br /&gt;Dim fromDate &lt;br /&gt;Dim toDate Dim days &lt;br /&gt;Dim daysNode &lt;br /&gt;set daysNode = XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:DaysRemaining&amp;quot;) &lt;/p&gt;
&lt;p&gt;fromDate = Trim(XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:Date&amp;quot;).text) &lt;br /&gt;toDate = Trim(XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:Date2&amp;quot;).text) &lt;/p&gt;
&lt;p&gt;if Len(fromDate) = 0 Or Len(toDate) = 0 &lt;br /&gt;Then daysNode.text = &amp;quot;n/a&amp;quot; &lt;br /&gt;else &lt;br /&gt;fromDate = CDate(fromDate) &lt;br /&gt;toDate = CDate(toDate) &lt;br /&gt;days = DateDiff(&amp;quot;d&amp;quot;, fromDate, toDate) &lt;/p&gt;
&lt;p&gt;&amp;#39; Determine whether the xsi:nil attribute is set for this &lt;br /&gt;&amp;#39; element. If so, remove the xsi:nil attributes so that &lt;br /&gt;&amp;#39; the value can be set. &lt;/p&gt;
&lt;p&gt;if Not IsNull(daysNode.getAttribute(&amp;quot;xsi:nil&amp;quot;)) then daysNode.removeAttribute(&amp;quot;xsi:nil&amp;quot;) &lt;br /&gt;end if &lt;br /&gt;daysNode.text = CStr(days) &lt;br /&gt;end if &lt;br /&gt;}&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item></channel></rss>