LPM: Specify pop-up window size using CGI.pm

David Hempy hempy at ket.org
Wed Sep 6 12:12:22 CDT 2000


At 11:50 AM 9/6/2000 -0400, you wrote:
> From a script, I want to open a pop-up window (i.e. new instance of a
>browser window) with a specific size. I know I can do this using
>JavaScript with something like this:
>
>window.open('width=320,height=240');
>
>Is there a way to specify the height and width of a new browser window
>using CGI.pm or other Perl methods?

Hmm...maybe I don't understand the problem...

In your cgi script running on the server, let's say you are just print-ing 
the html page, including its embedded javascript:

$win_w = 100;
$win_h = 150;
print "window.open('width=$win_w,height=$win_h');";

By the time it gets to the browser, it will be irrelevant that the 
javascript code was generated by a script or from a flat file.


...but I feel like that's not what you were looking for...

-dave


--
David Hempy
Internet Database Administrator
Kentucky Educational Television
<hempy at ket.org> -- (859)258-7164 -- (800)333-9764





More information about the Lexington-pm mailing list