Jump to content

Archived

This topic is now archived and is closed to further replies.

redbullmarky

custom popups

Recommended Posts

Hi all

Having a bit of a problem with a little bit of JS i'm writing. For an application I'm working on, I'm trying to partially simulate a Desktop environment. I have a script which, when called (clicking on a "desktop" icon), uses the DOM to open a popup window, with an iframe inside it. Sometimes, however, this popup will also contain icons that can open a further popup window, and so on. The problem I have is making sure that the popups are ALWAYS attached to the parent window, and not to the Iframe that requested a window to be opened. I'm trying to do a check here - how can my script detect whether it's being called from within an IFRAME or from the main parent window?
I thought about checking for the existence of "parent.document", but this seems to give the same result whether i call it from the iframe or the parent window.

Can anyone help me here?
Cheers
Mark

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.