redbullmarky Posted August 29, 2006 Share Posted August 29, 2006 Hi allHaving 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?CheersMark Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.