<?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>Send Email after a radio button is selected in a repeating table (OnAfterChange event)</title><link>https://www.infopathdev.com:443/forums/thread/40959.aspx</link><pubDate>Fri, 24 Apr 2009 11:13:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:40959</guid><dc:creator>Svetoslav</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/40959.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=40959</wfw:commentRss><description>&lt;p&gt;Hi all, &lt;/p&gt;
&lt;p&gt;I have to following problem considering a repeating table&amp;nbsp;with the follwing&amp;nbsp;of collumns:&lt;/p&gt;
&lt;p&gt;User&amp;nbsp;&amp;nbsp; Email&amp;nbsp;&amp;nbsp; Approve/Reject&lt;/p&gt;
&lt;p&gt;The collumn Approve/Reject consists of two radio buttons for approval or rejection. I want when a user selects one of the radio buttons, an automatic email notification to be send to a facilitator. I am currently using OnAfterChange event, to provoke the action. The code which I use is : &lt;/p&gt;
&lt;p&gt;var value = eventObj.Source.selectSingleNode(&amp;quot;..&amp;quot;).text ;&lt;/p&gt;
&lt;p&gt;var email = eventObj.Source.selectSingleNode(&amp;quot;....&amp;quot;).text ;&lt;/p&gt;
&lt;p&gt;var person = eventObj.Source.selectSingleNode(&amp;quot;....&amp;quot;).text; &lt;/p&gt;
&lt;p&gt;with the ...&amp;nbsp;I have the XPath to the elements in the repeating table&lt;/p&gt;
&lt;p&gt;But this code selects only the 1st row of the repeating table, even though for instance I have pressed the radio button on the 6th row. And if I insert a new role, the event&amp;nbsp;occurs again, which&amp;nbsp;I cannot explain why. I have selected the OnAfterChange event from the&amp;nbsp;Validations and Events&amp;nbsp;Handelrs menu&amp;nbsp;for the specific field in the repeating table. If someone has&amp;nbsp;an explanation&amp;nbsp;I would be very grateful to&amp;nbsp;hear/read it. &lt;/p&gt;
&lt;p&gt;Best regards, &lt;/p&gt;
&lt;p&gt;Svetoslav &amp;nbsp;&lt;/p&gt;</description></item></channel></rss>