Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    opening a new window whilst accessing a Perl (.pl) file

    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.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    620
    Thanks
    1
    Thanked 20 Times in 20 Posts
    <form ... target="_blank">

  • #3
    New to the CF scene
    Join Date
    Jul 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile I could kiss you!

    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

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Flint, Michigan, USA
    Posts
    620
    Thanks
    1
    Thanked 20 Times in 20 Posts
    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);">


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •