Jump to content


custom popups

  • Please log in to reply
No replies to this topic

#1 redbullmarky

  • Staff Alumni
  • Advanced Member
  • 2,863 posts
  • LocationBedfordshire, England

Posted 29 August 2006 - 11:06 AM

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?
"you have to keep pissing in the wind to learn how to keep your shoes dry..."

I say old chap, that is rather amusing!

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users