<?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 to make JSL pop up a dialog box and wait for the user to fill in the parameters? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620731#M81992</link>
    <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Can I adjust the start width of the dialog box in JSL parameters?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;Thanks Experts!&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ex=New Window("",&amp;lt;&amp;lt;modal,panel Box("",H List Box(teb=Text Edit Box())),
panel box("",h list box(button box("OK",na=teb&amp;lt;&amp;lt;get text))));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-04-07_09-58-22.png" style="width: 469px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51793i66A7DA8932565CE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-04-07_09-58-22.png" alt="2023-04-07_09-58-22.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 07 Apr 2023 02:01:41 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2023-04-07T02:01:41Z</dc:date>
    <item>
      <title>How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608320#M80970</link>
      <description>&lt;P&gt;How can a single JSL have it pop up a dialog at runtime, and when I fill in the text, it can read the content and pass it to the variable and continue running?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jun 2023 16:31:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608320#M80970</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-06-08T16:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608343#M80973</link>
      <description>&lt;P&gt;you need the &lt;EM&gt;modal&lt;/EM&gt; option.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="A modal window waits for a response; you can't do anything else until it closes." style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50726iDB29A20682B05780/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="A modal window waits for a response; you can't do anything else until it closes." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;A modal window waits for a response; you can't do anything else until it closes.&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 02:09:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608343#M80973</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-03-06T02:09:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608354#M80974</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;What I want to fill in is not a number, how to modify?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thank Craige!&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 03:05:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608354#M80974</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-03-06T03:05:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608357#M80975</link>
      <description>&lt;P&gt;A text edit box, rather than a num edit box.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="capture.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50728i14342FD8375D6EB8/image-size/large?v=v2&amp;amp;px=999" role="button" title="capture.png" alt="capture.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, take a look at &lt;LI-MESSAGE title="Modal Dialogs" uid="436177" url="https://community.jmp.com/t5/Uncharted/Modal-Dialogs/m-p/436177#U436177" discussion_style_icon_css="lia-mention-container-editor-message lia-img-icon-blog-thread lia-fa-icon lia-fa-blog lia-fa-thread lia-fa"&gt;&lt;/LI-MESSAGE&gt; , especially how to get the answers from the modal dialog.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 03:48:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608357#M80975</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-03-06T03:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608359#M80976</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;How can variable "a1" get the "efg" I filled in?&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-03-06_12-11-59.png" style="width: 438px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/50729i26E1BE6E056DA1BD/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-03-06_12-11-59.png" alt="2023-03-06_12-11-59.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 04:15:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608359#M80976</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-03-06T04:15:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608454#M80989</link>
      <description>&lt;P&gt;for modal, just change the example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ex = New Window( "Dialog() example",
	&amp;lt;&amp;lt;Modal,
	&amp;lt;&amp;lt;Return Result,
	V List Box( H List Box( "Set this value", variable = text Edit Box( "Change this text" ) ), H List Box( Button Box( "OK" ), Button Box( "Cancel" ) ) )
);&lt;BR /&gt;// because the window is modal, the window must be closed before the following code runs
If(
	ex["button"] == 1, // not canceled
// then show the value
	write(ex["variable"] ), // note: variable is the name of the variable holding the text edit box&lt;BR /&gt;// else report no selection
	write("CANCEL"); // cancel button or red X was pressed
);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The example in the scripting index needs a small rewrite to be more useful. I've fixed the main problem and added comments above. The main problem is the if-clause in the example is a confusing double-statement with a semicolon.&lt;/P&gt;
&lt;P&gt;edit: repair formatting (for some reason, the code formatter wants to mess up the final else statement)&lt;/P&gt;</description>
      <pubDate>Mon, 06 Mar 2023 12:03:04 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/608454#M80989</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-03-06T12:03:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/618395#M81782</link>
      <description>&lt;P&gt;How can make this complete operation possible?&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-03-23_19-25-23.png" style="width: 558px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51635i5277161FDAD827B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-03-23_19-25-23.png" alt="2023-03-23_19-25-23.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ex = New Window( "Example: Text Edit Box",
	Outline Box( "Picker Example",
		H List Box( Text Box( "Label:" ), Text Edit Box() )
	)
);

//Wait for me to input text  "JANE"
na = EvalContextBox;//??The variable automatically retrieves the filled text
dt &amp;lt;&amp;lt; Select Where( :name == na );
d3 = dt &amp;lt;&amp;lt; Subset(
	Output Table( "tmp" ),
	Selected Rows( 1 ),
	selected columns( 0 )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 31 Mar 2023 00:26:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/618395#M81782</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-03-31T00:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620365#M81960</link>
      <description>&lt;P&gt;Here's a working example.&amp;nbsp; You need to include &amp;lt;&amp;lt; modal, assign a variable to the text edit box, and retrieve the text edit box value before the user exits the modal dialog.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ex = New Window( "Example: Text Edit Box", &amp;lt;&amp;lt; modal,
	panel Box( "Picker Example", 
		H List Box( 
			Text Box( "Label:" ), 
			teb = Text Edit Box() ) ),
	panel box("Options",
		h list box(
			ok_button = button box("OK", na = teb &amp;lt;&amp;lt; get text),
			canc_button = button box("Cancel", na = "")
		)
	)
);

show(na);

// Wait for me to input text  "JANE"
dt &amp;lt;&amp;lt; Select Where( :name == uppercase(na) );
d3 = dt &amp;lt;&amp;lt; Subset( Output Table( "tmp" ), Selected Rows( 1 ), selected columns( 0 ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2023 17:32:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620365#M81960</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2023-04-05T17:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620441#M81967</link>
      <description>&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;There are two competing approaches.&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/4550"&gt;@pmroz&lt;/a&gt;&amp;nbsp; example shows one way to use a &amp;lt;&amp;lt;modal dialog.&amp;nbsp; The JSL callback function on the OK button copies values from the dialog into global variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Several answers above, I used the &amp;lt;&amp;lt;ReturnResult approach.&amp;nbsp; &amp;lt;&amp;lt;ReturnResult captures values of named display boxes. The results are returned in a list.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 23:19:16 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620441#M81967</guid>
      <dc:creator>Craige_Hales</dc:creator>
      <dc:date>2023-04-05T23:19:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620442#M81968</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ex=New Window("",&amp;lt;&amp;lt;modal,panel Box("",H List Box(teb=Text Edit Box())),panel box("",h list box(button box("OK",na=teb&amp;lt;&amp;lt;get text))));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 05 Apr 2023 23:56:01 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620442#M81968</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-04-05T23:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620731#M81992</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;Can I adjust the start width of the dialog box in JSL parameters?&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;Thanks Experts!&lt;/LI&gt;&lt;/UL&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;ex=New Window("",&amp;lt;&amp;lt;modal,panel Box("",H List Box(teb=Text Edit Box())),
panel box("",h list box(button box("OK",na=teb&amp;lt;&amp;lt;get text))));&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2023-04-07_09-58-22.png" style="width: 469px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/51793i66A7DA8932565CE0/image-size/large?v=v2&amp;amp;px=999" role="button" title="2023-04-07_09-58-22.png" alt="2023-04-07_09-58-22.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 02:01:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-make-JSL-pop-up-a-dialog-box-and-wait-for-the-user-to/m-p/620731#M81992</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-04-07T02:01:41Z</dc:date>
    </item>
  </channel>
</rss>

