www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to leave a iFrame

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Location
    Ft Lauderdale
    Posts
    299

    How to leave a iFrame

    is there any way that i can check if my page is beeing loaded inside of a iFrame, and then tell it to loaditself in the parent windo?

    Thanks

  2. #2
    Join Date
    Jul 2008
    Location
    urbana, il
    Posts
    2,787
    haven't tested, but this should work...
    Code:
    try{
     if(top.location.href!=self.location.href){top.location.href=self.location.href;}
    }catch(er){
     top.location.href=self.location.href;
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles