...

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



Tricky
07-07-2003, 05: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:

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

Tricky
07-07-2003, 06: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
:thumbsup:

jalarie
07-07-2003, 06: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() {
&nbsp;&nbsp;&nbsp;Opts='width=300,height=600';
&nbsp;&nbsp;&nbsp;P1=window.open('','xxx',Opts);
&nbsp;&nbsp;}
&nbsp;</script>

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

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



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum