<?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 ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2059.aspx</link><pubDate>Fri, 31 Mar 2006 11:39:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2059</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2059.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2059</wfw:commentRss><description>Thankyou very much.</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2058.aspx</link><pubDate>Tue, 28 Mar 2006 16:20:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2058</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2058.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2058</wfw:commentRss><description>Cool, I'm glad you're starting to get the hang of it! I noticed a few bugs in your code and I have made some revisions:&lt;br /&gt;&lt;br /&gt;var row = XDocument.DOM.selectSingleNode("/my:myFields/my:SORDetails/my:RepeatingData") ;&lt;br /&gt;row = row.cloneNode(true) ;&lt;br /&gt;row.selectSingleNode("my:SORQTY").text = "QTY" ;&lt;br /&gt;&lt;font color="red"&gt;row.parentNode.appendChild(row) ;&lt;/font id="red"&gt;&lt;br /&gt;&lt;br /&gt;Hope this helps!</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2057.aspx</link><pubDate>Tue, 28 Mar 2006 11:16:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2057</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2057.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2057</wfw:commentRss><description>It has taken me a while. Part of my confusion is that I thought the namespace had been declared and that on viewing the code from button properties it simply hid this detail. I have since realised that the namespace was not declared. So Matt, thankyou for your advice. It looks like I am on the right path now, and it seems to have the x factor required.&lt;br /&gt;&lt;br /&gt;Once again thankyou very much for the guidance.</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2056.aspx</link><pubDate>Tue, 28 Mar 2006 07:42:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2056</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2056.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2056</wfw:commentRss><description>Thankyou Matt, but I am still lost.&lt;br /&gt;&lt;br /&gt;I have created a few textboxes, a dropdownlist, a button and a repeating table. My intention is to add a new row to the repeating table extracting information from the dropdown and textboxes when the button is clicked. &lt;br /&gt;&lt;br /&gt;I have previously extracted information from specific nodes without much difficulty. It is just this process of creating a new row in the table that I am stuck with. &lt;br /&gt;&lt;br /&gt;You refered to a link which talks about referencing namespaces of a secondary datasource. But I am looking to move data from one node to another in the same xml without looking at another datasource. I do not understand why I cannot do this. &lt;br /&gt;&lt;br /&gt;My book on all things Infopath is taking it's time to get here and I think this boils down to my fundamental lack of understanding on how Infopath hangs together.&lt;br /&gt;&lt;br /&gt;Here is my code behind:&lt;br /&gt;&lt;br /&gt;{&lt;br /&gt;var row = XDocument.DOM.selectSingleNode("/my:myFields/my:SORDetails/my:RepeatingData") ;&lt;br /&gt;row = row.cloneNode(true) ;&lt;br /&gt;row.selectSingleNode("my:SORQTY").text = "QTY" ;&lt;br /&gt;var parent = thisXDocument.DOM.selectSingleNode("/my:myFields") ;&lt;br /&gt;parent.appendChild(row) ;&lt;br /&gt;&lt;br /&gt;And from the extracted Template.xml:&lt;br /&gt;&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;br /&gt;&amp;lt;?mso-infoPathSolution name="urn:schemas-microsoft-com:office:infopath:new-design-1:-myXSD-2006-03-03T16-21-10" href="manifest.xsf" solutionVersion="1.0.0.9" productVersion="11.0.6565" PIVersion="1.0.0.0" ?&amp;gt;&lt;br /&gt;&amp;lt;?mso-application progid="InfoPath.Document"?&amp;gt;&lt;br /&gt;&amp;lt;my:myFields xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:od="urn:schemas-microsoft-com:officedata" xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-03-03T16:21:10" xmlns:xd="http://schemas.microsoft.com/office/infopath/2003"&amp;gt;&lt;br /&gt;	&amp;lt;my:SORDetails&amp;gt;&lt;br /&gt;		&amp;lt;my:RepeatingData&amp;gt;&lt;br /&gt;                    &amp;lt;my:SORQTY&amp;gt;&amp;lt;/my:SORQTY&amp;gt;&lt;br /&gt;		&amp;lt;/my:RepeatingData&amp;gt;&lt;br /&gt;	&amp;lt;/my:SORDetails&amp;gt;&lt;br /&gt;&amp;lt;/my:myFields&amp;gt;&lt;br /&gt;&lt;br /&gt;Any further help would be great!&lt;br /&gt;&lt;br /&gt;Thanks</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2055.aspx</link><pubDate>Thu, 23 Mar 2006 22:36:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2055</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2055.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2055</wfw:commentRss><description>Hi Paul,&lt;br /&gt;&lt;br /&gt;This sounds like a namespace issue.  Removing the namespace from the select function call may have stopped the error on that line, but it does not mean that the XPath works!  You will almost certainly need to add a reference to the namespace in order to get at this node.&lt;br /&gt;&lt;br /&gt;I think the information foudn in this HowTo should help:&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=ed2cf0c5895f468995cdd081cf17fead&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=ed2cf0c5895f468995cdd081cf17fead&lt;/a&gt;</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2054.aspx</link><pubDate>Thu, 23 Mar 2006 21:15:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2054</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2054.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2054</wfw:commentRss><description>Changed the namespace prefix to //SORItemData but now fails on the clone line. Trial and error got me to that point - I am still trying to get my head round how to reference namespaces and elements correctly in script.&lt;br /&gt;&lt;br /&gt;Line it fails on: row = row.cloneNode(true);&lt;br /&gt;&lt;br /&gt;'null' is null or not an object - is this because the first row of the repeating table is empty?&lt;br /&gt;&lt;br /&gt;Many thanks&lt;br /&gt;&lt;br /&gt;Spudy</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2053.aspx</link><pubDate>Thu, 23 Mar 2006 21:02:13 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2053</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2053.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2053</wfw:commentRss><description>Thanks for that. I am not familiar with .js - but now that I have made the changes the form loads but on clicking the button the following message occurs:&lt;br /&gt;&lt;br /&gt;Reference to undeclared namespace prefix: 'my'&lt;br /&gt;&lt;br /&gt;Thankyou for your help I realise that I now need to look at the XMLSchema and figure out the namespace. I thought this was the default as created by Infopath.&lt;br /&gt;&lt;br /&gt;Thankyou for you prompt reply...</description></item><item><title>Re: Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/2052.aspx</link><pubDate>Thu, 23 Mar 2006 15:54:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:2052</guid><dc:creator>K.Ramana Reddy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/2052.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=2052</wfw:commentRss><description>Hi Spuddy, Welcome to the forum,&lt;br /&gt;&lt;br /&gt;You have to do like this,&lt;br /&gt;&lt;br /&gt;var row = XDocument.DOM.selectSingleNode("//my:SORItemData");&lt;br /&gt;&lt;br /&gt;This will work for you,&lt;br /&gt;&lt;br /&gt;Thanks.</description></item><item><title>Expected ';' File:script.js - when opening form</title><link>https://www.infopathdev.com:443/forums/thread/1208.aspx</link><pubDate>Thu, 23 Mar 2006 15:23:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:1208</guid><dc:creator>spudy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/1208.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=1208</wfw:commentRss><description>I have a form with a button which is creating a new row in a repeating table. Except whenever I attempt to open the form I recieve the error:&lt;br /&gt;&lt;br /&gt;Expected ' ; '&lt;br /&gt;File:script.js&lt;br /&gt;Line:x&lt;br /&gt;IXMLDOMNode row = thisXDocument.DOM.selectSingleNode("//my:SORItemData");&lt;br /&gt;&lt;br /&gt;Tried everything I can think of but the error is always there. Any advice (other than give it up!)&lt;br /&gt;&lt;br /&gt;Many thanks.&lt;br /&gt;&lt;br /&gt;Spuddy</description></item></channel></rss>