<?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: Changing the Button Text</title><link>https://www.infopathdev.com:443/forums/thread/33422.aspx</link><pubDate>Thu, 23 Oct 2008 15:26:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33422</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33422.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33422</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;The following would work, and involves no code.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Add two new fields to your form, a boolean field called &lt;em&gt;shown&lt;/em&gt; and a text field called &lt;em&gt;buttonText&lt;/em&gt;.&amp;nbsp; In the control properties, set the button&amp;#39;s text to be the value of buttonText.&amp;nbsp; Set the default value of &lt;em&gt;buttonText&lt;/em&gt; to be &amp;quot;Show&amp;quot; and the default of &lt;em&gt;shown&lt;/em&gt; to be false&lt;em&gt;.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Now add these rules to the button:&lt;br /&gt;Rule 1 (condition: shown = &amp;quot;false&amp;quot;): Set &lt;em&gt;shown &lt;/em&gt;to &amp;quot;true&amp;quot; and set &lt;em&gt;buttonText&lt;/em&gt; to &amp;quot;Hide&amp;quot; (check &amp;quot;Stop processing rules when this rule finishes&amp;quot;)&lt;br /&gt;Rule&amp;nbsp;2 (condition: shown = &amp;quot;true&amp;quot;): Set &lt;em&gt;shown&lt;/em&gt; to &amp;quot;false&amp;quot; and set&lt;em&gt; buttonText&lt;/em&gt; to &amp;quot;Show&amp;quot;&lt;/p&gt;</description></item><item><title>Re: Changing the Button Text</title><link>https://www.infopathdev.com:443/forums/thread/33359.aspx</link><pubDate>Wed, 22 Oct 2008 13:07:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33359</guid><dc:creator>mjm917</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33359.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33359</wfw:commentRss><description>&lt;p&gt;That is what I thought as well. My initial tests used the following code:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;btnShowAllExamples.value = &amp;#39;Hide All examples&amp;#39;;&lt;br /&gt;XDocument.UI.Alert(btnShowAllExamples.value);&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;&amp;nbsp;Which resulted in an &lt;strong&gt;&lt;em&gt;Object doesn&amp;#39;t support this property or method&lt;/em&gt;&lt;/strong&gt; error. If I just&amp;nbsp;use the alert statement, it is blank&lt;/p&gt;
&lt;p&gt;Here is the code I &amp;quot;want&amp;quot; I should be using based off of previous experience with javascript.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;if (btnShowAllExamples.value == &amp;#39;Show All Examples&amp;#39;)&lt;br /&gt;&amp;nbsp;&amp;nbsp; btnShowAllExamples.value = &amp;#39;Hide All examples&amp;#39;;&lt;br /&gt;else&lt;br /&gt;&amp;nbsp;&amp;nbsp; btnShowAllExamples.value = &amp;#39;Show All Examples&amp;#39;;&amp;nbsp;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;I can&amp;#39;t&amp;nbsp;be the first&amp;nbsp;person who has wanted to do this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I should clarify that I am using IP 2003.&amp;nbsp;When you look at the button properties the &amp;quot;text&amp;quot; is stored in the &amp;quot;label property.&amp;quot;&lt;/p&gt;
&lt;p&gt;Also, I never thought I would say this but... Is there anyway to get intellisense to work in IP2k3?&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Changing the Button Text</title><link>https://www.infopathdev.com:443/forums/thread/33328.aspx</link><pubDate>Wed, 22 Oct 2008 05:27:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33328</guid><dc:creator>Shiva</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33328.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33328</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Depends on your condition you can change the text of the button as below,&lt;/p&gt;
&lt;p&gt;if(&amp;lt;Condition to change the text&amp;gt;)&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; btnShowAllExamples.value = &amp;quot;Hide&amp;quot;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;else&lt;/p&gt;
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; btnShowAllExamples.value = &amp;quot;Show&amp;quot;;&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;</description></item><item><title>Changing the Button Text</title><link>https://www.infopathdev.com:443/forums/thread/33320.aspx</link><pubDate>Tue, 21 Oct 2008 21:09:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:33320</guid><dc:creator>mjm917</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/33320.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=33320</wfw:commentRss><description>&lt;p&gt;I want to change the text of one of the form buttons (ID = btnShowAllExamples) from &amp;quot;Show&amp;quot; to &amp;quot;Hide&amp;quot; so that I can use it as a toggle. &lt;br /&gt;How do I get a reference to the button in the jscript onClick event&lt;/p&gt;
&lt;p&gt;I have probably overthought this and need someone to point me in the right direction again.it &lt;/p&gt;
&lt;p&gt;Thanks in advance.&lt;/p&gt;</description></item></channel></rss>