<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Close button</title><link>https://www.infopathdev.com:443/forums/thread/50271.aspx</link><pubDate>Sat, 02 Jan 2010 21:00:43 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50271</guid><dc:creator>parajuli_95</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50271.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50271</wfw:commentRss><description>&lt;p&gt;Thank you for comments - i will try it and let you know if it works.&lt;/p&gt;
&lt;p&gt;happy new year.&lt;/p&gt;</description></item><item><title>Re: Close button</title><link>https://www.infopathdev.com:443/forums/thread/50083.aspx</link><pubDate>Sat, 19 Dec 2009 22:26:39 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50083</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50083.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50083</wfw:commentRss><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have found that the following way works well to close a browser based form with&amp;nbsp;button click. In the button click event you can use the following code:&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; btnClose_Clicked(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;object&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; sender, &lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;ClickedEventArgs&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font size="2"&gt; e)&lt;br /&gt;{&lt;br /&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp; string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; closeWindowPath = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/_layouts/windowclose.htm&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="courier new,courier"&gt;;&lt;br /&gt;&lt;/font&gt;&lt;font face="courier new,courier"&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;&amp;nbsp; // Redirect to close the form&lt;br /&gt;&lt;/font&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;&amp;nbsp; HttpContext&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Current.Response.Redirect(closeWindowPath, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;false&lt;/font&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2" face="courier new,courier"&gt;);&lt;br /&gt;}&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Besides this you need a second file (&amp;quot;windowclose.htm&amp;quot;) which you can put wherever you want --- I prefer the &amp;quot;/_layouts&amp;quot;-Folder but you can choose another location as well.&lt;br /&gt;&lt;/font&gt;&lt;font size="2"&gt;In this file you have to write the following HTML/Javascript code:&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font size="2"&gt;&amp;lt;html&amp;gt;&lt;br /&gt;&amp;lt;head&amp;gt;&lt;br /&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; language=&amp;quot;JavaScript&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.close();&lt;br /&gt;&amp;lt;/script&amp;gt;&lt;br /&gt;&amp;lt;/head&amp;gt;&lt;br /&gt;&amp;lt;/html&amp;gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;Now if you press the &amp;quot;close&amp;quot; button you will be asked if you want to close the browser.&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;Hope that helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;</description></item><item><title>Re: Close button</title><link>https://www.infopathdev.com:443/forums/thread/50072.aspx</link><pubDate>Sat, 19 Dec 2009 05:37:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:50072</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/50072.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=50072</wfw:commentRss><description>&lt;p&gt;What version of InfoPath are you using? You can add a rule to InfoPath 2007 with custom actions that close the form on submit. No code required.&lt;/p&gt;
&lt;p&gt;You can also add code to the form that does this and call that from a button using the XdExtension:: xpath prefix.&lt;/p&gt;</description></item><item><title>Close button</title><link>https://www.infopathdev.com:443/forums/thread/49946.aspx</link><pubDate>Tue, 15 Dec 2009 19:52:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:49946</guid><dc:creator>parajuli_95</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/49946.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=49946</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;
&lt;p&gt;I am new in infopath, and i need to add a &amp;quot;close&amp;quot; button in the inforpath form which is publish in web. So if user click in the close button then from should be closed.&lt;/p&gt;
&lt;p&gt;I have of course tried rule =&amp;gt; close this form but it just refresh but don&amp;#39;t close in browser. (in infopath it does work).&lt;/p&gt;
&lt;p&gt;I search in google and i can see many comments code in Vb script, C#, VB, JScript and so on but i am not able to fix the code which i found.&lt;/p&gt;
&lt;p&gt;I am using &amp;quot;Visual Studio 2005 Tools for Applications&amp;quot; to view code, can some one help me what is the code behind the button?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>