JavaScript help with opening popups usings window.open and target=_parent

Discussion in 'JavaScript' started by james00bond00, Sep 21, 2011.

  1. #1
    Hey,

    I'm having trouble figuring this out. I have a link that i'm trying to make work with a popup window to a second url. For exampl:

    <a href="/myRegularLinkAddress.htm/" target="_parent" onClick=window.open("http://www.SecondAddress.com","_blank");>CLICK HERE</a>
    HTML:
    The problem is that this code is inside a popup plugin i have on WordPress. The regular URL has to have the _parent target, or it wont work right with the popup. Yet I want the javascript to open a second window for an external URL. I can get the javascript only to work if i set target to _blank, yet then the very first page is still open.

    Can anyone help me with this? Thanks so much in advance.
     
    james00bond00, Sep 21, 2011 IP
  2. james00bond00

    james00bond00 Greenhorn

    Messages:
    29
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    13
    #2
    nevermind, i figured it out. I just replace target with _top.
     
    james00bond00, Sep 21, 2011 IP