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?
No replies to this topic
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users