Search code examples
javascripthyperlinkpopupwindowparent

Open a link from a popup window in a new tab in the parent window


Is it possible to have a link in a popup window open in a new tab in the parent window?

Here's the flow: I have a page with a link on it (call it Page A). Clicking the link on Page A opens a popup window (Page B). Clicking a link on Page B opens another page (Page C) in the parent window, but it replaces Page A.

What I want to do is have the link on Page B (the popup) open Page C in a new tab in the parent window, so that Page A remains open.


Solution

  • try

     parent.window.open("http://www.javascript-coder.com","mywindow");
    

    otherwise please post what you already have and we'll pick it up from there....