<?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: Disable and enable a section with VBScript</title><link>https://www.infopathdev.com:443/forums/thread/69699.aspx</link><pubDate>Fri, 26 Aug 2011 12:25:34 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69699</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69699.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=69699</wfw:commentRss><description>&lt;p&gt;You shouldn&amp;#39;t need code to do this.&amp;nbsp; Just create a Boolean field in your data source called &lt;strong&gt;showInfo1&lt;/strong&gt;, and have it default to &lt;strong&gt;false&lt;/strong&gt;.&amp;nbsp; Create two buttons, one that says Show, and one that says Hide.&amp;nbsp; Give the Show button a rule to set &lt;strong&gt;showInfo1&lt;/strong&gt; to &lt;strong&gt;true&lt;/strong&gt;, and have Hide set &lt;strong&gt;showInfo1&lt;/strong&gt; to &lt;strong&gt;false&lt;/strong&gt;.&amp;nbsp; Then add conditional formatting to hide the section and the Hide button when &lt;strong&gt;showInfo1&lt;/strong&gt; is equal to &lt;strong&gt;false&lt;/strong&gt;, and to hide the Show button when &lt;strong&gt;showInfo1&lt;/strong&gt; is equal to &lt;strong&gt;true&lt;/strong&gt;.&amp;nbsp; All done!&lt;/p&gt;</description></item><item><title>Disable and enable a section with VBScript</title><link>https://www.infopathdev.com:443/forums/thread/69689.aspx</link><pubDate>Fri, 26 Aug 2011 06:54:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:69689</guid><dc:creator>dchrist1</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/69689.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=69689</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hello everbody,&lt;/p&gt;&lt;p&gt;first of all I don&amp;#39;t know the exactly names of the elements in english, because I&amp;#39;m german and using the german version of Infopath. I started yesterday with using Infopath for adding listitems in Sharepoint. Now I would like to make an info-section(name=info_1), which is normally disabled. If the user clicks on the Button (name=info, text=show info) this info-section should be opened and the button-text should be changed to &amp;quot;hide&amp;quot;. And if the user clicks again, the section should be disabled and the text should be &amp;quot;show info. I would like to do that with the help of VBscript, but I don&amp;#39;t know how to make it. Could you maybe help me? &lt;/p&gt;&lt;p&gt;I started with using this code, but it doesn&amp;#39;t work. :) I never worked with a programming language, so I would be very happy if you can help me.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Sub CTRL98_OnClick(eventObj)&lt;/p&gt;&lt;p&gt;XDocument.DOM.selectSingleNode(&amp;quot;/my:meineFelder/my:info_1&amp;quot;).visible=true &lt;br /&gt;&lt;/p&gt;&lt;p&gt;End Sub&lt;/p&gt;&lt;p&gt;&amp;nbsp; &lt;/p&gt;&lt;p&gt;thank you&lt;/p&gt;&lt;p&gt;Daniel &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>