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
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Javascript/DOM: Popups accessing spawning/parent windows

  • 30-06-2005 6: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,523 ✭✭✭optiplexgx270


    window.alert(opener.window.location);

    if you want to change the parent you go

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


Advertisement