Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to identify if a window is within an iframe

    I have jsp1.jsp with an iframe iframe1.jsp within. Once the http session is expired any page is redirected to a logout1.jsp page.

    If the iframe1.jsp was loaded and httpsession expired the logout1.jsp is displayed inside the iframe .... but I want it to be displayed on the full screen.

    My idea is to check once loading the logout1.jsp if it is inside an iframe and to reload it's parent. I tried following lines within the logout.jsp. It worked well, but caused an infinite loop ...

    if (window.parent != null )
    window.parent.location.reload();

    I guess it is not the correct way to check if a window is within an iframe...

  • #2
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Have you tried using window.frameElement


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •