Results 1 to 6 of 6

Thread: Open new window BUT......

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100

    Open new window BUT......

    Hi.

    I need to know how I open a new window in a browser BUT if I already have opend it I want to show my info in the window..

    Example:

    I got a shopingcart and I want to show a helpwindow.. If the user clicks on help a new window shall open.. If he clicks on another help then the already opend helpwindow shall show the new help..

    Best regards Johan Ryberg

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Code:
    window.open('page.html','name', etc...
    For each of your help links, specify the same window name. That way, when the link is clicked, it will load in the already opened window that was given that name.

    So make sure the 'name' properties aren't unique.
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3
    Addicted Member
    Join Date
    Nov 2001
    Location
    Yewston, Texis
    Posts
    240
    One thing to watch out for is the already-opened window will indeed get the new contents, but it will not bump up to the foreground. Anyone know how to make a window pop forward?

    cudabean

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    may I got a functionally codeexample?

    Best regards Johan Ryberg

  5. #5
    Hyperactive Member progressive's Avatar
    Join Date
    Sep 2001
    Location
    Manchester, UK
    Posts
    404
    here's an example
    Code:
    <html>
    <head>
    </head>
    <script>
    function helpPopUp(help_page)
    {
    	var help_window = window.open(help_page,'hintswindow','width=300,height=300,top=300,left=300');
    	help_window.focus();
    }
    </script>
    <body>
    <a href="#" onclick="helpPopUp('http://www.vbforums.com')">help 1</a><br>
    <a href="#" onclick="helpPopUp('http://www.vbsquare.com')">help 2</a><br>
    </body>
    </html>

  6. #6

    Thread Starter
    Lively Member
    Join Date
    May 1999
    Posts
    100
    ah =) Thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width