View Full Version : opening a new window whilst accessing a Perl (.pl) file

07-07-2003, 06:20 PM
How do I open up a new pop-up window using JS using a SUBMIT button that is linked to a Perl (.pl) file using METHOD="GET". Thanks.:confused:

07-07-2003, 06:45 PM
<form ... target="_blank">

07-07-2003, 07:10 PM
I've gone 3 nights without sleep trying to figure that one out, thank you!! I do have just one other question, can you fix the size and attributes of the target window? (like in JS: ("http://www.w3schools.com","my_new_window","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400") etc...

Many thanks

07-07-2003, 07:18 PM
Two possibilities that I know of:

&nbsp;<form ... target="xxx" onsubmit="return JS_Sub();">
&nbsp;<script type="text/javascript">
&nbsp;&nbsp;function JS_Sub() {

or generate a page from the .pl that resizes itself however you want it:

&nbsp;<body ... onload="javascript:resizeTo(400,600);">