Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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", "<!--\", "\"\", \"Confirm\",\"width=350, height=400, + toolbar=no menubar=no, scrollbars=no, resizeable=no\")\n", "popup.location.href=\"\n\", " = \"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", "<!--\", "\"\", \"Confirm\",\"width=350, height=400, + toolbar=no menubar=no, scrollbars=no, resizeable=no\")\n", "popup.location.href=\"\n\", " = \"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

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

  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?

What's my password?
Create A New User
Domain Nodelet?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-10-04 16:53 GMT
Find Nodes?
    Voting Booth?

    No recent polls found