<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I close a “New window”? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510562#M73806</link>
    <description>&lt;P&gt;Here is a slightly more complicated example showing how to close a non-modal window with either the OK or Cancel buttons.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = new window("Test",
	textbox("Hello World"),
	panelbox("Actions",
		hlistbox(
			okb = button box("OK", &amp;lt;&amp;lt; set icon("Go"),
				set script(
					show("Clicked OK");
					// Other OK actions here
					nw &amp;lt;&amp;lt; close window();
				),
			),
			canb = button box("Cancel", &amp;lt;&amp;lt; set icon("Stop"),
				set script(
					show("Clicked Cancel");
					nw &amp;lt;&amp;lt; close window();
				),
			),
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1655383151938.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43316i334E11752A51E1EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1655383151938.png" alt="pmroz_0-1655383151938.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jun 2022 12:39:39 GMT</pubDate>
    <dc:creator>pmroz</dc:creator>
    <dc:date>2022-06-16T12:39:39Z</dc:date>
    <item>
      <title>How do I close a “New window”?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510545#M73798</link>
      <description>&lt;P&gt;I have been trying to close new windows but am successful, for arguments sake, I tried x = New Window( *some code*);&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Close(x);
x &amp;lt;&amp;lt; Close();
x &amp;lt;&amp;lt; Close;
x &amp;lt;&amp;lt; Close Window();&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Any help would be greatly appreciated&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:01:34 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510545#M73798</guid>
      <dc:creator>Andyon98</dc:creator>
      <dc:date>2023-06-09T17:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close a “New window”?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510546#M73799</link>
      <description>&lt;P&gt;&amp;lt;&amp;lt; Close Window; or &amp;lt;&amp;lt; Close Window(); should work&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here(1);

nw = New Window("");
wait(2);
nw &amp;lt;&amp;lt; Close Window();&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 07:32:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510546#M73799</guid>
      <dc:creator>jthi</dc:creator>
      <dc:date>2022-06-16T07:32:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close a “New window”?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510547#M73800</link>
      <description>&lt;P&gt;For syntax questions such as you are asking, you can find your answers in the Scripting Index.&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Help=&amp;gt;Scripting Index&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 08:08:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510547#M73800</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-06-16T08:08:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close a “New window”?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510562#M73806</link>
      <description>&lt;P&gt;Here is a slightly more complicated example showing how to close a non-modal window with either the OK or Cancel buttons.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;nw = new window("Test",
	textbox("Hello World"),
	panelbox("Actions",
		hlistbox(
			okb = button box("OK", &amp;lt;&amp;lt; set icon("Go"),
				set script(
					show("Clicked OK");
					// Other OK actions here
					nw &amp;lt;&amp;lt; close window();
				),
			),
			canb = button box("Cancel", &amp;lt;&amp;lt; set icon("Stop"),
				set script(
					show("Clicked Cancel");
					nw &amp;lt;&amp;lt; close window();
				),
			),
		)
	)
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pmroz_0-1655383151938.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43316i334E11752A51E1EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="pmroz_0-1655383151938.png" alt="pmroz_0-1655383151938.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 12:39:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/510562#M73806</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-06-16T12:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I close a “New window”?</title>
      <link>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/518128#M74433</link>
      <description>&lt;P&gt;Here's another wrinkle with regard to closing windows.&amp;nbsp; Let's say you have a dataset open and when the user clicks OK or Cancel there is an action to close the dataset.&amp;nbsp; But what if the user clicks the close window button (X in upper right)?&amp;nbsp; The on close() function takes care of it.&amp;nbsp; Here's an example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;// Build a display window for ftab_box
ftab_window = New Window("Frequency Tab", &amp;lt;&amp;lt; on close(close(ftab_dataset, nosave)),
	H List Box(
		Button Box("Save to MSWord",
			ftab_output &amp;lt;&amp;lt; Save MSWord("", Native);
		),
		Text Box( "   " ),
		Button Box( "Close this Window", 
					ftab_window &amp;lt;&amp;lt; CloseWindow; 
//					close(ftab_dataset, nosave);	// This gets run by on close above
					),
	),
	ftab_output = vlistbox(
		outlinebox(ftab_title,
			ftab_box),
	),
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jul 2022 16:56:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-do-I-close-a-New-window/m-p/518128#M74433</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2022-07-06T16:56:18Z</dc:date>
    </item>
  </channel>
</rss>

