Well, here is an example of what you could use:
$q = new CGI; if(defined($q->param("confirm"))) { if($q->param("confirm") eq "yes"){ #execute code for yes } else { #execute code for no } } else { print $q->header(), "<html>\n", "<head>\n", "<script laguage\"JavaScript\">\n", "<!--\", "popup=window.open(\"\", \"Confirm\",\"width=350, height=400, + toolbar=no menubar=no, scrollbars=no, resizeable=no\")\n", "popup.location.href=\"http://domain.com/confirm.html\n\", "popup.opener.name = \"opener\", "// -->\n", "</script>\n", "</head>\n<body>", "</body></html>"; }
Then your confirm.html page could look like this
<html> <body> <form target="opener" action"location.of.script" method="post" o +nsubmit="window.close()"> <input type="radio" value="yes" name="confirm">Yes <input type="radio" value="no" name="confirm">No <input type="submit" value="submit" name="submit"> </form> </body> </html>
Update: I'm not sure and I didn't feel like testing it right now but the onsubmit tage in the form might be slightly miss written. What might happen, unfortunately is that the window would close before the form got submitted. So instead of testing the code, I will offer an alt. so as to make my life easier. First delete the onsubmit attribute. Then put this code replace the perl ouput code to this:
... else { print $q->header(), "<html>\n", "<head>\n", "<script laguage\"JavaScript\">\n", "<!--\", "popup=window.open(\"\", \"Confirm\",\"width=350, height=400, + toolbar=no menubar=no, scrollbars=no, resizeable=no\")\n", "popup.location.href=\"http://domain.com/confirm.html\n\", "popup.opener.name = \"opener\", "// -->\n", "</script>\n", "</head>\n<body onunload=\"popup.close();\">", "</body></html>"; } ...
P.S. this might just be a better all around solution.
Clovs aka jclovs

In reply to Re: Popup Message Box? by jclovs
in thread Popup Message Box? by mschnarr

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.