How to open url in back of main window?

Discussion in 'Programming' started by stefffff, May 14, 2007.

  1. #1
    how can i open a new window in the back of the existing one? for instance i am on home and when the user clicks on a certain link.. that link will open a window in the back of the home page? does anyone knows how to do this??
     
    stefffff, May 14, 2007 IP
  2. haxanstudios

    haxanstudios Member

    Messages:
    46
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #2
    can you make it a little clear, what you mean by the BACK of the home page.

    do you want to have the link open in the same window or a new window?
     
    haxanstudios, May 14, 2007 IP
  3. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #3
    He means so it doesn't take focus, I can't think of how to do it off the top of my head.
     
    CodyRo, May 14, 2007 IP
  4. kentuckyslone

    kentuckyslone Notable Member

    Messages:
    4,371
    Likes Received:
    367
    Best Answers:
    0
    Trophy Points:
    205
    #4
    to open a link in a new window add target="_blank" to the hyperlink

    This will open the link in a new window, but it will be in the front
     
    kentuckyslone, May 14, 2007 IP
  5. CodyRo

    CodyRo Peon

    Messages:
    365
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    0
    #5
    CodyRo, May 14, 2007 IP
  6. rgchris

    rgchris Peon

    Messages:
    187
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    You can use JavaScript to refocus the front page once the second one is opened. Just create a function then call it on the onclick event.
     
    rgchris, May 14, 2007 IP
  7. rodney88

    rodney88 Guest

    Messages:
    480
    Likes Received:
    37
    Best Answers:
    0
    Trophy Points:
    0
    #7
    var popunder = window.open("http://www.urltoopen.com/","newpopup","");
    popunder.blur();
    window.focus();
    HTML:
     
    rodney88, May 15, 2007 IP