Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/18995-custom-popups/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.