1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Any way to break out of Iframe after action is complete?

Discussion in 'Black Hat SEO' started by paperchaser, Nov 13, 2008.

  1. paperchaser

    paperchaser Guest

    Just working on some site design, and was wondering if its possible to break out of an iFrame after an action is completed within it? Is there a script that can monitor the Iframes contents and then break out when it changes?

    Any help is appreciated!!
     
  2. istarapol

    istarapol Junior Member

    Joined:
    Jun 3, 2008
    Messages:
    110
    Likes Received:
    228
    Occupation:
    Graphic Designer
    Location:
    Under Your Bed
    Home Page:
    try this between <head></head>

    create a new function (in javasctipt) to call the time (in seconds) before loading this.
    Code:
    <script language="Javascript">
    <!--
    if (top.location!= self.location) {
    top.location = self.location.href
    }
    //-->
    </script>
     
  3. Tom__

    Tom__ Junior Member

    Joined:
    Nov 9, 2008
    Messages:
    134
    Likes Received:
    300
    Code:
    <script>
    setTimeout ("if (top.location!= self.location) { top.location = self.location.href; }", 5000)
    </script>
    
    This will work after 5 seconds :)
     
  4. paperchaser

    paperchaser Guest

    Should I place that code in the iframe? Something like:

    Code:
    <iframe name="MyIframe" id="MyIframe" src="http://iframedurl.com" scrolling="no">
    <script type="text/javascript">
    setTimeout ("if (top.location!= self.location) { top.location = self.location.href; }", 5000)
    </script>
    </iframe>
    
    I tried that but it doesn't seem to work. As soon as I submit the form the page still stays in the iframe? Any help is appreciated!