<?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: How can I assign a Jscript function return value t</title><link>https://www.infopathdev.com:443/forums/thread/13498.aspx</link><pubDate>Thu, 25 Aug 2005 10:41:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:13498</guid><dc:creator>Agni Jonnalagadda</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/13498.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=13498</wfw:commentRss><description>Hi Alan,&lt;br /&gt;Welcome to the forum.&lt;br /&gt;You can use onafterchange event to set values. &lt;br /&gt;&lt;br /&gt;Rules on any control(except button) execute when a value changes in the xml, its not related to textbox or any control. If you change the value in the xml it should automatically reflect in the UI.&lt;br /&gt;&lt;br /&gt;OnAfterChange method is also called when a value in the XML changes.&lt;br /&gt;&lt;br /&gt;Agni&lt;br /&gt;InfoPath Dev India</description></item><item><title>How can I assign a Jscript function return value t</title><link>https://www.infopathdev.com:443/forums/thread/12536.aspx</link><pubDate>Wed, 24 Aug 2005 20:45:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:12536</guid><dc:creator>moeen49</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/12536.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=12536</wfw:commentRss><description>SUBJECT: How can I assign a Jscript function return value to a textbox by using a Rule?&lt;br /&gt;&lt;br /&gt;Hi,&lt;br /&gt;&lt;br /&gt;I have a Jscript function that returns a value based on some calculations.&lt;br /&gt;&lt;br /&gt;How can I show the return value of this function within a textbox by using a Rule?&lt;br /&gt;&lt;br /&gt;I know that it is easy to do this job by using a button (because you can use code to handle the click event), but I need the functionality upon any change on other textboxes. The problem is you cannot use code to handle textbox change event.&lt;br /&gt;&lt;br /&gt;I#%92ve also gone through this article:&lt;br /&lt;a target="_blank" href=http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae61191bac084fff&gt;http://www.infopathdev.com/howto/tutorials/default.aspx?i=88f921f13dec4e7cae61191bac084fff&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But the technique provides totally different thing.&lt;br /&gt;&lt;br /&gt;It helps you to use Jscript function check conditions (true/false). Moreover, It doesn't help you to assign value to textboxes. If you attempt to modify any textbox value within that Jscript function, InfoPath pops up an error and complains that you are modifying a read-only value. I think all &lt;br /&gt;textboxes become read-only when you are checking any conditions within rules or conditional formatting.&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Any help would be appreciated,&lt;br /&gt;&lt;br /&gt;Alan&lt;br /&gt;</description></item></channel></rss>