Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

CGI::Application - how to get a popup window

by jdtoronto (Prior)
on Aug 21, 2006 at 15:02 UTC ( #568563=perlquestion: print w/replies, xml ) Need Help??

jdtoronto has asked for the wisdom of the Perl Monks concerning the following question:

Esteemed monks,

Can anyone tell me how to get a popup window using CGI::Application? I want to have a 'wizard' that pops up in a separate window and from the documentation I can figure out how to make it work?

jdtoronto

  • Comment on CGI::Application - how to get a popup window

Replies are listed 'Best First'.
Re: CGI::Application - how to get a popup window
by gryphon (Abbot) on Aug 21, 2006 at 15:17 UTC

    Greetings jdtoronto,

    CGI::Application is a Perl module, so it helps organize work that needs to be done server-side. Opening a pop-up window is a client-side function, so it requires Javascript (unless you just want a new, full-size window, in which case you can just use an anchor target). In the returned HTML for the page, add something like this:

    <script type="text/javascript"> window.open( "your-cgi-wrapper.cgi?rm=popupstart", "popup", "width=500" ); </script>

    Obviously, "popupstart" is the run-mode of the first page of the pop-up.

    gryphon
    Whitepages.com Development Manager (WDDC)
    code('Perl') || die;

      Thanks gryphon, I had it in my head that I could do it with headers without having to use the JavaScript, but the JS method works so why not!

      jdtoronto

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://568563]
Approved by chargrill
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2020-11-26 13:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?