Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Javascript/DOM: Popups accessing spawning/parent windows

  • 30-06-2005 06:25PM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 Posts: 2,591 ✭✭✭optiplexgx270


    window.alert(opener.window.location);

    if you want to change the parent you go

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


Advertisement