<?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>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Cant get form to clear after submit in Code (2003)</title><link>https://www.infopathdev.com:443/forums/thread/32341.aspx</link><pubDate>Thu, 18 Sep 2008 16:35:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32341</guid><dc:creator>aesalazar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32341.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=32341</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Thanks for the reply.&lt;/p&gt;&lt;p&gt;&amp;nbsp;It turns out, it was the line:&lt;/p&gt;&lt;p&gt;newDOM.load(&amp;quot;TJ_Template.xml&amp;quot;);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;I change it to &amp;quot;Template.xml&amp;quot; and that solved it.&lt;/p&gt;&lt;p&gt;&amp;nbsp;Ernie &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Cant get form to clear after submit in Code (2003)</title><link>https://www.infopathdev.com:443/forums/thread/32331.aspx</link><pubDate>Thu, 18 Sep 2008 12:51:29 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32331</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32331.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=32331</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You have to check ‘newDataFields&amp;#39; node and ‘existingDataFields&amp;#39; node structure is same or not? In these you might have different values but replacing with new child node is should be equal to old child node structure. You have to verify this replacing new child is under the ‘existingDataFields.parentNode&amp;#39; node only. If new child or old child node structure is different you will get error.&lt;/p&gt;</description></item><item><title>Cant get form to clear after submit in Code (2003)</title><link>https://www.infopathdev.com:443/forums/thread/32317.aspx</link><pubDate>Wed, 17 Sep 2008 23:43:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:32317</guid><dc:creator>aesalazar</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/32317.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=32317</wfw:commentRss><description>&lt;p&gt;Hey guys.&amp;nbsp; I have a form setup with an OnSubmitRequest function setup in JScript.&amp;nbsp; After the form is submittted, I would like to have it clear (just like the option if you use the UI Submit button).&amp;nbsp; I wrote the following based on what I found on this forum and various tinkering but I keep getting runtime errors (null objects):&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;function Reload_Form()&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;var newDOM = new ActiveXObject(&amp;quot;Msxml2.DOMDocument.5.0&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;newDOM.async = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;newDOM.validateOnParse = false;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;newDOM.load(&amp;quot;TJ_Template.xml&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;var ns = XDocument.DOM.getProperty(&amp;quot;SelectionNamespaces&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;var existingDataFields = XDocument.DOM.selectSingleNode(&amp;quot;//dfs:myFields&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;newDOM.setProperty(&amp;quot;SelectionNamespaces&amp;quot;, ns);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;var newDataFields = domTemplate.selectNodes(&amp;quot;//dfs:myFields&amp;quot;);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;existingDataFields.parentNode.replaceChild(newDataFields.cloneNode(true), existingDataFields);&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;br /&gt;}&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;The form name is TJ_Template.xsn.&amp;nbsp; I tried selectNodes instead of selectSingleNode, //my:Fields instead of //dfs:myFields, CreateObject instead of ActiveXObject, and so on but always end up with a similar runtime time error.&amp;nbsp; Am I missing something?&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks&lt;/p&gt;&lt;p&gt;Ernie &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>