<?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: Modal windows - the &amp;quot;OK&amp;quot; button in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5832#M5831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following--&lt;/P&gt;&lt;P&gt;Change from modal to nonmodal and and add a "Cancel" button box.&lt;/P&gt;&lt;P&gt;I would suggest moving&amp;nbsp; your text edit box and&amp;nbsp; "OK" button box as well.&lt;/P&gt;&lt;P&gt;The messages will be printed to the log with each button that is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;P&gt;!-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Courier; color: #951890;"&gt;&lt;SPAN style="color: #000000;"&gt;nw &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #161ce0;"&gt;new window&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"My Modal Window"&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; nonmodal&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier; color: #161ce0;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;h list box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;text box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #951890;"&gt;"Type here: "&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;teb &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;text edit box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #951890;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #161ce0;"&gt;Button Box&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #951890;"&gt;"OK"&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt; usertext &lt;SPAN style="color: #0a0e90;"&gt;=&lt;/SPAN&gt; teb &lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;Get Text&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier; color: #951890;"&gt;&lt;SPAN style="color: #161ce0;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;usertext &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;""&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #161ce0;"&gt;throw&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"!Error 001: (No Value)--Enter a value before proceeding"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;nw&lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;Close Window&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Clear log&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Write&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #951890;"&gt;"You entered the text = "&lt;/SPAN&gt; &lt;SPAN style="color: #0a0e90;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;usertext&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;SPAN style="color: #161ce0;"&gt;Button Box&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #951890;"&gt;"Cancel"&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt; nw&lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;Close Window&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Clear Log&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Write&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #951890;"&gt;"User Cancelled."&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;SPAN style="color: #0a0e90;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;SPAN style="color: #0a0e90;"&gt;-!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 27 Oct 2012 04:23:59 GMT</pubDate>
    <dc:creator>stan_koprowski</dc:creator>
    <dc:date>2012-10-27T04:23:59Z</dc:date>
    <item>
      <title>Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5831#M5830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: calibri, verdana, arial, sans-serif; font-size: 12pt;"&gt;Hi - I want to create a modal window that requests a response from the user, something like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;teb &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;text edit box&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;""&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;ok &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;button box&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"OK"&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;nw &lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;=&lt;/SPAN&gt; &lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;new window&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"My Modal Window"&lt;/SPAN&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; modal&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;SPAN style="color: teal; font-family: 'Courier New'; font-size: 9pt;"&gt;1&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; h list box&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #0000dd; font-family: 'Courier New'; font-size: 9pt;"&gt;text box&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: purple; font-family: 'Courier New'; font-size: 9pt;"&gt;"Type here: "&lt;/SPAN&gt;&lt;STRONG style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: navy; font-family: 'Courier New'; font-size: 9pt;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt; teb&lt;STRONG&gt;),&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; font-size: 9pt; font-family: 'Courier New';"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-family: 'Courier New'; font-size: 9pt;"&gt;ok&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: black; line-height: 115%; font-family: 'Courier New'; font-size: 9pt;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: navy; line-height: 115%; font-family: 'Courier New'; font-size: 9pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; color: #000000; font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;How can I prevent the window from closing if the user clicks on “OK” &lt;EM&gt;without&lt;/EM&gt; supplying a response?&amp;nbsp; I’ve tried adding assorted scripts to the “OK” button to see if teb contains a string of greater than zero length, and then only closing the window if it has, but I can’t seem to find the right syntax: the window always closes regardless.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; color: #000000; font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;I note that the window supplies an "OK" button even if I don't include it (presumably because it has to have one), so I'm wondering whether it is replacing my "OK" button with one of its own.&amp;nbsp; Is it possible that &lt;EM&gt;that's&lt;/EM&gt; the problem?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 115%; color: #000000; font-size: 12pt; font-family: calibri, verdana, arial, sans-serif;"&gt;Many thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 15:26:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5831#M5830</guid>
      <dc:creator />
      <dc:date>2012-10-23T15:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5832#M5831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try the following--&lt;/P&gt;&lt;P&gt;Change from modal to nonmodal and and add a "Cancel" button box.&lt;/P&gt;&lt;P&gt;I would suggest moving&amp;nbsp; your text edit box and&amp;nbsp; "OK" button box as well.&lt;/P&gt;&lt;P&gt;The messages will be printed to the log with each button that is selected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Stan&lt;/P&gt;&lt;P&gt;!-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-family: Courier; color: #951890;"&gt;&lt;SPAN style="color: #000000;"&gt;nw &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #161ce0;"&gt;new window&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"My Modal Window"&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; nonmodal&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier; color: #161ce0;"&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;h list box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;text box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #951890;"&gt;"Type here: "&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;teb &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;text edit box&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #951890;"&gt;""&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #161ce0;"&gt;Button Box&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #951890;"&gt;"OK"&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt; usertext &lt;SPAN style="color: #0a0e90;"&gt;=&lt;/SPAN&gt; teb &lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;Get Text&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier; color: #951890;"&gt;&lt;SPAN style="color: #161ce0;"&gt;If&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;usertext &lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;""&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #161ce0;"&gt;throw&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;/SPAN&gt;"!Error 001: (No Value)--Enter a value before proceeding"&lt;SPAN style="color: #000000;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;nw&lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;Close Window&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Clear log&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Write&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #951890;"&gt;"You entered the text = "&lt;/SPAN&gt; &lt;SPAN style="color: #0a0e90;"&gt;||&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;char&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;usertext&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;STRONG&gt;))&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;SPAN style="color: #161ce0;"&gt;Button Box&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt; &lt;SPAN style="color: #951890;"&gt;"Cancel"&lt;/SPAN&gt;&lt;SPAN style="color: #0a0e90;"&gt;,&lt;/SPAN&gt; nw&lt;SPAN style="color: #0a0e90;"&gt;&amp;lt;&amp;lt;&lt;/SPAN&gt;Close Window&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Clear Log&lt;/SPAN&gt;&lt;STRONG&gt;()&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt; &lt;SPAN style="color: #161ce0;"&gt;Write&lt;/SPAN&gt;&lt;STRONG&gt;(&lt;/STRONG&gt;&lt;SPAN style="color: #951890;"&gt;"User Cancelled."&lt;/SPAN&gt;&lt;STRONG&gt;)&lt;/STRONG&gt; &lt;STRONG&gt;)&lt;/STRONG&gt; &lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;SPAN style="color: #0a0e90;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;SPAN style="color: #0a0e90;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: Courier;"&gt;&lt;SPAN style="color: #0a0e90;"&gt;-!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 27 Oct 2012 04:23:59 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5832#M5831</guid>
      <dc:creator>stan_koprowski</dc:creator>
      <dc:date>2012-10-27T04:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5833#M5832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;On a related point to the one above, I'd prefer to retain the modal status of the window I've created below if at all possible, but change the name of the "OK" button to the word "Quit" - even though I'd like its inherent functionality (i.e. to close the window after doing anything else that's been specified within the button's associated script) to be unchanged.&amp;nbsp; Is that possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;nw = new window( "My Window", &amp;lt;&amp;lt; modal(1), button box("OK", nw &amp;lt;&amp;lt; close window) );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I simply change the name to anything else the window automatically creates a new "OK" button to replace the one that's been removed - and I don't want that to happen.&amp;nbsp; Two possible courses of action that occurred to me were that maybe I could a) make the "OK" button invisible and just create another button called "Quit" to close the window, or perhaps b) hide it behind another object in the window - but I can't see a way to do either of these.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 02 Feb 2014 16:02:40 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5833#M5832</guid>
      <dc:creator />
      <dc:date>2014-02-02T16:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5834#M5833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dodo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The OK button or its "equivalent" is required in a modal window.&amp;nbsp; The point is to construct your modal window so that the user makes choices and then clicks "OK" or "Cancel" to those choices.&amp;nbsp; The equivalent is "Yes" and "No".&lt;/P&gt;&lt;P&gt;Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New Window("Modal Demo", &amp;lt;&amp;lt;Modal,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Textbox("Do you really want to do that?"),&lt;/P&gt;&lt;P&gt;&amp;nbsp; ButtonBox("Yes"),&lt;/P&gt;&lt;P&gt;&amp;nbsp; ButtonBox("No")&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;So, you must always construct your modal dialog to end in "Yes" or "No" or "OK" and "Cancel".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you think about this, it makes sense.&amp;nbsp; You have two choices: accept or do not accept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more specific to your question, you can disable the "OK" or "Yes" button until something is done.&amp;nbsp; Try the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stuff Selected = "";&lt;BR /&gt;Entry Window = List(Button(-1));&lt;/P&gt;&lt;P&gt;Ask the User Expr = Expr (&lt;/P&gt;&lt;P&gt;Entry Window = New Window("Modal Demo", &amp;lt;&amp;lt;Modal,&lt;BR /&gt;&amp;nbsp; TextBox("Please enter some stuff?"),&lt;BR /&gt;&amp;nbsp; Stuff = TextEditBox("", &amp;lt;&amp;lt;Script(Stuff Selected = Stuff &amp;lt;&amp;lt; Get Text; Yes Button &amp;lt;&amp;lt; Enable(1))),&lt;BR /&gt;&amp;nbsp; Yes Button = ButtonBox("Yes", &amp;lt;&amp;lt;Enable(0)),&lt;BR /&gt; );&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;While(Stuff Selected == "" | Entry Window["Button"] == -1,&lt;/P&gt;&lt;P&gt;Ask the User Expr;&lt;/P&gt;&lt;P&gt;);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 14:24:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5834#M5833</guid>
      <dc:creator>michaelhaslam_p</dc:creator>
      <dc:date>2014-02-03T14:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5835#M5834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I've got it now - that's exactly what I needed to know.&amp;nbsp; The original question arose because I wasn't actually aware of until now was that using "Yes" and/or "No" as in the above example &lt;EM&gt;don't&lt;/EM&gt; result in the automatic generation of an unwanted "OK" button within the window (whereas for example using alternatives like "Accept" and "Reject" would), quite simply because I've never actually tried them - I'd previously assumed that calling the button "OK" was the only option available.&amp;nbsp; Now I know I've a choice of four, the problem evaporates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Feb 2014 17:57:00 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/5835#M5834</guid>
      <dc:creator />
      <dc:date>2014-02-03T17:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35557#M20973</link>
      <description>&lt;P&gt;Dear Michael,&lt;/P&gt;&lt;P&gt;thank you very much for this elegant solution.&lt;/P&gt;&lt;P&gt;I would like to use your code to not only check if somthing&amp;nbsp;was entered into the Textbox but to check on the length of the character that&amp;nbsp;was entered. Do you have a working solution to that? I did not succeed yet.&lt;/P&gt;&lt;P&gt;In the end my goal is to have three text boxes and to do this check on each of them, and only if all three checks are passed, the "OK" button would be enabled.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Tina&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 13:54:19 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35557#M20973</guid>
      <dc:creator>Tina</dc:creator>
      <dc:date>2017-02-09T13:54:19Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35562#M20978</link>
      <description>&lt;P&gt;This example should illustrate one way:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;teb1 state = teb2 state = 0; // set to false or off

dlg = New Window( "Dialog", &amp;lt;&amp;lt; Modal,
	teb1 = Text Edit Box( "",
		&amp;lt;&amp;lt; Set Function(
			Function( { me }, { content },
				content = me &amp;lt;&amp;lt; Get Text;
				teb1 state = Length( content );
				ok &amp;lt;&amp;lt; Enabled( teb1 state &amp;amp; teb2 state );
			)
		)
	),
	teb2 = Text Edit Box( "",
		&amp;lt;&amp;lt; Set Function(
			Function( { me }, { content },
				content = me &amp;lt;&amp;lt; Get Text;
				teb2 state = Length( content );
				ok &amp;lt;&amp;lt; Enabled( teb1 state &amp;amp; teb2 state );
			)
		)
	),
	H List Box(
		ok = Button Box( "OK",
			text1 = teb1 &amp;lt;&amp;lt; Get;
			text2 = teb2 &amp;lt;&amp;lt; Get;,
			&amp;lt;&amp;lt; Enabled( 0 )
		),
		Button Box( "Cancel" )
	)
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:08:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35562#M20978</guid>
      <dc:creator>Mark_Bailey</dc:creator>
      <dc:date>2017-02-09T14:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35565#M20979</link>
      <description>&lt;P&gt;Here is a simple example with one text box.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

nw = New Window( "text boxes", 
	modal,
	v list box(
	tb1 = Text Edit Box( "",
		&amp;lt;&amp;lt;set width( 200 ),
		&amp;lt;&amp;lt;set script(
			Show( tb1 &amp;lt;&amp;lt; get text, Length( tb1 &amp;lt;&amp;lt; get text ) );
			If( tb1 &amp;lt;&amp;lt; get text != "" &amp;amp; Length( tb1 &amp;lt;&amp;lt; get text ) &amp;gt; 5,
				bb &amp;lt;&amp;lt; enable( 1 ),
				bb &amp;lt;&amp;lt; enable( 0 )
			);
		)
	),
	bb = Button Box( "OK", nw &amp;lt;&amp;lt; close window )),
	bb &amp;lt;&amp;lt; enable( 0 );
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2017 14:19:21 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35565#M20979</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-02-09T14:19:21Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35570#M20984</link>
      <description>&lt;P&gt;You could also do it with a while loop, and only exit when text has been entered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

stay_in_loop = 1;
entered_text = "";
while(stay_in_loop,
	
	nw = New Window( "text boxes", modal,
		h list box(
			tb = Text Box( "Enter your text: "),
			teb = text edit box("", set width(200), set wrap(200)),
		),
		bb = Button Box( "OK", entered_text = teb &amp;lt;&amp;lt; get text),
	);
	
	if (entered_text == "",
	// then
		errwin = new window("Error", &amp;lt;&amp;lt; modal,
			textbox("You must enter some text.  Please try again")
		);
		,
	// else
		stay_in_loop = 0;
	);
);

print(entered_text);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:15:55 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35570#M20984</guid>
      <dc:creator>pmroz</dc:creator>
      <dc:date>2017-02-09T16:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35571#M20985</link>
      <description>&lt;P&gt;I thank all of you for the quick and detailed reply.&lt;/P&gt;&lt;P&gt;The solution I use now is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Names Default To Here( 1 );&lt;/P&gt;&lt;P&gt;nw = New Window( "Please insert up to three names",&lt;BR /&gt;modal,&lt;BR /&gt;v list box(&lt;BR /&gt;&lt;BR /&gt;Text Box( "Name 1:" ),&lt;BR /&gt;&lt;BR /&gt;tb1 = Text Edit Box( "",&lt;BR /&gt;&amp;lt;&amp;lt;set width( 200 ),&lt;BR /&gt;&amp;lt;&amp;lt;set script(&lt;BR /&gt;Show( tb1 &amp;lt;&amp;lt; get text, Length( tb1 &amp;lt;&amp;lt; get text ) );&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;&lt;BR /&gt;Text Box( "Name 2:" ),&lt;BR /&gt;&lt;BR /&gt;tb2 = Text Edit Box( "",&lt;BR /&gt;&amp;lt;&amp;lt;set width( 200 ),&lt;BR /&gt;&amp;lt;&amp;lt;set script(&lt;BR /&gt;Show( tb2 &amp;lt;&amp;lt; get text, Length( tb2 &amp;lt;&amp;lt; get text ) );&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;&lt;BR /&gt;Text Box( "Name 3:" ),&lt;BR /&gt;&lt;BR /&gt;tb3 = Text Edit Box( "",&lt;BR /&gt;&amp;lt;&amp;lt;set width( 200 ),&lt;BR /&gt;&amp;lt;&amp;lt;set script(&lt;BR /&gt;Show( tb3 &amp;lt;&amp;lt; get text, Length( tb3 &amp;lt;&amp;lt; get text ) );&lt;BR /&gt;&lt;BR /&gt;If((tb1 &amp;lt;&amp;lt; get text == "" | Length( tb1 &amp;lt;&amp;lt; get text ) == 8)&lt;/img&gt; &amp;amp;&lt;BR /&gt;(tb2 &amp;lt;&amp;lt; get text == "" | Length( tb2 &amp;lt;&amp;lt; get text ) == 8)&lt;/img&gt; &amp;amp;&lt;BR /&gt;(tb3 &amp;lt;&amp;lt; get text == "" | Length( tb3 &amp;lt;&amp;lt; get text ) == 8)&lt;/img&gt; ,&lt;BR /&gt;bb &amp;lt;&amp;lt; enable( 1 ),&lt;BR /&gt;bb &amp;lt;&amp;lt; enable( 0 )&lt;BR /&gt;);&lt;BR /&gt;&lt;BR /&gt;)&lt;BR /&gt;),&lt;BR /&gt;&lt;BR /&gt;bb = Button Box( "OK", nw &amp;lt;&amp;lt; close window )),&lt;BR /&gt;bb &amp;lt;&amp;lt; enable( 0 );&lt;BR /&gt;);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So one should be able to press the "OK" button if for each name either a character string with length 8 or no character string is entered.&lt;/P&gt;&lt;P&gt;What still does not work as I hoped is if I enter only one name with length 8, and I do that for Name 3, then I can click the button. Otherwise (if I enter one name with length 8 for Name 1 or Name 2), it is not possible to click the button.&lt;/P&gt;&lt;P&gt;Any advice here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards and thanks again,&lt;/P&gt;&lt;P&gt;Tina&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 16:21:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35571#M20985</guid>
      <dc:creator>Tina</dc:creator>
      <dc:date>2017-02-09T16:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35580#M20992</link>
      <description>&lt;P&gt;your IF/Then logic will have to be made a part of each of the text items, so that code is executed when any of the text edit boxes change in value.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Feb 2017 17:56:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35580#M20992</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-02-09T17:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: Modal windows - the "OK" button</title>
      <link>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35641#M21016</link>
      <description>Thank you very much. That seems to work!</description>
      <pubDate>Fri, 10 Feb 2017 07:02:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Modal-windows-the-quot-OK-quot-button/m-p/35641#M21016</guid>
      <dc:creator>Tina</dc:creator>
      <dc:date>2017-02-10T07:02:44Z</dc:date>
    </item>
  </channel>
</rss>

