Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?you need the modal option.
A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.A modal window waits for a response; you can't do anything else until it closes.
Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?Thank Craige!
Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?A text edit box, rather than a num edit box.

Also, take a look at Modal Dialogs , especially how to get the answers from the modal dialog.
Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?Thanks Experts!

Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?for modal, just change the example:
ex = New Window( "Dialog() example",
<<MODAL></MODAL>// 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<BR />// else report no selection
write("CANCEL"); // cancel button or red X was pressed
);
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.
edit: repair formatting (for some reason, the code formatter wants to mess up the final else statement)
Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?How can make this complete operation possible?
Thanks Experts!

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 << Select Where( :name == na );
d3 = dt << Subset(
Output Table( "tmp" ),
Selected Rows( 1 ),
selected columns( 0 )
);
Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?Here's a working example. You need to include << modal, assign a variable to the text edit box, and retrieve the text edit box value before the user exits the modal dialog.
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
ex = New Window( "Example: Text Edit Box", << 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 << get text),
canc_button = button box("Cancel", na = "")
)
)
);
show(na);
// Wait for me to input text "JANE"
dt << Select Where( :name == uppercase(na) );
d3 = dt << Subset( Output Table( "tmp" ), Selected Rows( 1 ), selected columns( 0 ) );Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?There are two competing approaches.
@pmroz example shows one way to use a <
Several answers above, I used the <
Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?ex=New Window("",<<MODAL></MODAL>Re: How to make JSL pop up a dialog box and wait for the user to fill in the parameters?ex=New Window("",<<MODAL></MODAL>
How to make JSL pop up a dialog box and wait for the user to fill in the parameters?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?
Thanks!
Advanced Statistical ModelingAutomation and ScriptingContent Organization