Results 1 to 2 of 2

Thread: Javascript Help with Popup window

  1. #1
    Join Date
    Aug 2007
    Location
    Ft Myers, FL
    Posts
    32
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Javascript Help with Popup window

    I have the following link in my ASP page. Which has a list of multiple images.

    Code:
    <a href="chart.asp?ID=<%=chart%>" target="_blank">Chart</a>
    Is it possible to have whatever link is click load in the same broswer.

    So if the user minimizes the new window now and clicks another link... they will have 2, 3, 4 and so on windows open. I would only like the list... and then 1 extra window for the chart.

    Thanks for any help you provide

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    target="_blank" means a new window distinct from any existing window. If you were to use a name instead, like:

    target="bob"

    and use the same name for all of the links, they will reuse the existing named window if it is already open:

    HTML Code:
    <a href="http://www.google.com" target="bob">Google</a><br>
    <a href="http://www.yahoo.com" target="bob">Yahoo</a>
    That's just straight HTML, no javascript required unless you want to control other aspects of the new window. Even with javascript, if you target the same window each time, it will be reused if open.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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