<?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: Delete checked items in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/52837.aspx</link><pubDate>Wed, 17 Mar 2010 15:07:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52837</guid><dc:creator>ndbhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52837.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52837</wfw:commentRss><description>Thanks a lot. It worked like a charm.</description></item><item><title>Re: Delete checked items in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/52831.aspx</link><pubDate>Wed, 17 Mar 2010 14:55:42 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52831</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52831.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52831</wfw:commentRss><description>&lt;p&gt;You&amp;#39;re still getting the error because dataFieldsChildren is a list of &lt;i&gt;all&lt;/i&gt; the &lt;b&gt;my:field1&lt;/b&gt;s in the form, while dataFieldsNode is the &lt;i&gt;first&lt;/i&gt; &lt;b&gt;my:group2&lt;/b&gt; in the form.&amp;nbsp; There are probably &lt;b&gt;my:field1&lt;/b&gt; nodes that are not children of the first &lt;b&gt;my:field2&lt;/b&gt; node.&lt;/p&gt;&lt;p&gt;Try this, changing the value in quotes if your checked value is something other than &lt;i&gt;true&lt;/i&gt;.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;nbsp;dataFieldsChildren=XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:group1/my:group2[my:field1 = &amp;#39;true&amp;#39;]&amp;quot;);&lt;br /&gt;//parent
 is group2
&lt;/p&gt;&lt;p&gt;&amp;nbsp;dataFieldsNode=XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group1&amp;quot;);&lt;/p&gt;&lt;/blockquote&gt;</description></item><item><title>Re: Delete checked items in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/52825.aspx</link><pubDate>Wed, 17 Mar 2010 13:16:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52825</guid><dc:creator>ndbhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52825.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52825</wfw:commentRss><description>&lt;p&gt;I am not sure if I got the code correct but I made the following change and it still reads the same error&lt;/p&gt;
&lt;p&gt;function CTRL6_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var dataFieldsChildren&lt;br /&gt;&amp;nbsp;var dataFieldsNode&lt;/p&gt;
&lt;p&gt;//child is field1&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;dataFieldsChildren=XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:group1/my:group2/my:field1&amp;quot;);&lt;br /&gt;//parent is group2&lt;/p&gt;
&lt;p&gt;&amp;nbsp;dataFieldsNode=XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group1/my:group2&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for(i=0;i&amp;lt;dataFieldsChildren.length;i++)&lt;br /&gt;&amp;nbsp;{&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp; dataFieldsNode.removeChild(dataFieldsChildren(i));&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;Thanks for your patience.&lt;/p&gt;
&lt;p&gt;Nik&lt;/p&gt;</description></item><item><title>Re: Delete checked items in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/52818.aspx</link><pubDate>Wed, 17 Mar 2010 08:04:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52818</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52818.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52818</wfw:commentRss><description>&lt;p&gt;In the expression &lt;strong&gt;A&lt;/strong&gt;.removeChild(&lt;strong&gt;B&lt;/strong&gt;), B has to be a child node of A, but in your code, &lt;strong&gt;dataFieldsNode&lt;/strong&gt; and &lt;strong&gt;dataFieldsChildren(i)&lt;/strong&gt; are both my:field1.&lt;/p&gt;</description></item><item><title>Delete checked items in repeating table</title><link>https://www.infopathdev.com:443/forums/thread/52816.aspx</link><pubDate>Wed, 17 Mar 2010 06:57:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:52816</guid><dc:creator>ndbhatt</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/52816.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=52816</wfw:commentRss><description>&lt;p&gt;Version: Infopath&amp;nbsp;2003&amp;nbsp;&lt;br /&gt;Script: jscript&lt;br /&gt;Aim: Onclick of a button delete selected (checked) rows in a&amp;nbsp;repeating table&lt;br /&gt;Error: the parameter node is not a child of this node&lt;br /&gt;Form structure:&lt;/p&gt;
&lt;p&gt;Myfields (root)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;group1&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;group2 (repeating table)&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;field1 (check box: TRUE and FALSE)&lt;br /&gt;field2 (Text)&lt;br /&gt;field3 (Text)&lt;br /&gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;&lt;/blockquote&gt;
&lt;p&gt;I am not sure what&amp;#39;s wrong with the code below.&lt;/p&gt;
&lt;p&gt;Here is the code&lt;/p&gt;
&lt;p&gt;function CTRL6_5::OnClick(eventObj)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp;var dataFieldsChildren&lt;br /&gt;&amp;nbsp;var dataFieldsNode&lt;/p&gt;
&lt;p&gt;&amp;nbsp;dataFieldsChildren=XDocument.DOM.selectNodes(&amp;quot;/my:myFields/my:group1/my:group2/my:field1&amp;quot;);&lt;br /&gt;&amp;nbsp;dataFieldsNode=XDocument.DOM.selectSingleNode(&amp;quot;/my:myFields/my:group1/my:group2/my:field1&amp;quot;);&lt;/p&gt;
&lt;p&gt;&amp;nbsp;for(i=0;i&amp;lt;dataFieldsChildren.length;i++)&lt;br /&gt;&amp;nbsp;{&amp;nbsp;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&amp;nbsp; dataFieldsNode.removeChild(dataFieldsChildren(i));&lt;br /&gt;&amp;nbsp;}&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Gurus, please help.&lt;/p&gt;
&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;Nik&lt;/p&gt;</description></item></channel></rss>