in reply to Popup Message Box?
Well, here is an example of what you could use:
Clovs aka jclovs
Then your confirm.html page could look like this$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>"; }
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:<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>
P.S. this might just be a better all around solution.... 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>"; } ...
Clovs aka jclovs
In Section
Seekers of Perl Wisdom