Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Javascript/DOM: Popups accessing spawning/parent windows

Options
  • 30-06-2005 7:25pm
    #1
    Registered Users Posts: 304 ✭✭


    Hey,

    I'm trying to write a popup window that can have effect on the parent window. Namely I want to be able to read what URL the parent window is looking at. At the moment I have two files

    popup2.html and popup2_popped.html

    popup2.html opens popup2_popped.html and what I want is to have a document.write statement that reads the URL from the browser that was looking at popup2.html - or reference the parent window in general.

    I know that this must be possible because I've seen some pages provide controls in a popup window that then effected the parent window, although I have no idea how to manage this.

    Can anyone help? I've tried google, but it's not my friend right now.

    Take care,
    Phantom Beaker


Comments

  • Registered Users Posts: 2,502 ✭✭✭optiplexgx270


    window.alert(opener.window.location);

    if you want to change the parent you go

    opener.window.location = 'page.html';


Advertisement