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 6 of 6

Thread: multiple popups

  1. #1
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    multiple popups

    I am trying to use this script for several links on the same page, but am not sure how to set it up. All the links end up going to the first link's url


    <script>

    //Popup Window Script
    //By JavaScript Kit (http://javascriptkit.com)
    //JavaScript tutorials and over 400+ free scripts

    function openpopup(){
    var popurl="thankyou.htm"
    winpops=window.open(popurl,"","width=400,height=338,")
    }

    </script>

    <a href="javascript:openpopup()">Click here to open window</a>

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    function openpopup(popurl){

    winpops=window.open(popurl,"","width=400,height=338,")
    }

    </script>

    <a href="java script:openpopup('thepage')">Click here to open window</a>

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Location
    Massachusetts
    Posts
    472
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Code:
    <script type="text/javascript">
      function openSizedWindow( url )
      {
         window.open( url, '', 'width=400,height=388');
      }
    </script>
    Then...

    Code:
    <a href="#" onclick="openSizedWindow('file1.html');">Test 1.</a>
    <a href="#" onclick="openSizedWindow('file2.html');">Test 2.</a>
    Moderator @ WebDeveloper.com
    Mentor @ WebXpertz.net

  • #4
    New to the CF scene
    Join Date
    Sep 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks this worked great.
    I appreciate the help.

    Kelly

  • #5
    New to the CF scene
    Join Date
    Nov 2003
    Location
    Denmark
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can you use the same pop-up window over and over?

    I like the script for Kelster's problem, with a pop-up for each URL.
    My question is, can this be done using only one pop-up and reloading the content? I saw this technique in an image-viewer script at http://www.javascriptkit.com/script/...opimage2.shtml

    and would like to use it for my URLS.

  • #6
    New to the CF scene
    Join Date
    Nov 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am trying ot use the code from fred mv below, but I get an error 404 when the window pops-up. It say in the window that it cannot find my html document (correct name) on the server. I know that it is looking for the right document....but that document is already on my server? What now?


    Please check out:
    www.guirtsite.com/branding

    go to link #1 for the error please.

    Thanks for the help.


  •  

    Posting Permissions

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