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

Breaking "Frame Breakers"?

Discussion in 'HTML & JavaScript' started by «ó«ô»ò» Lurk «ó«ô»ò», Jun 9, 2008.

  1. «ó«ô»ò» Lurk «ó«ô»ò»

    «ó«ô»ò» Lurk «ó«ô»ò» Newbie

    Joined:
    May 16, 2008
    Messages:
    33
    Likes Received:
    6
    Occupation:
    Black hatter
    Location:
    TRS-80 Level II BASIC
    Home Page:
    What is the state of framing sites with framebreaking code ?

    (usually framebreakers are javascript like this...)

    Code:
      if (top.location != location) {
        top.location.href = document.location.href ;
    in the BODY onload event.

    The last time that I looked into this, it could be done on IE 6+ but on Firefox, it causes a dialog box to pop up and scare the viewer.

    Anything new out there?
     
  2. jaeden

    jaeden BANNED BANNED

    Joined:
    Jun 3, 2008
    Messages:
    232
    Likes Received:
    28
    would be nice
     
  3. «ó«ô»ò» Lurk «ó«ô»ò»

    «ó«ô»ò» Lurk «ó«ô»ò» Newbie

    Joined:
    May 16, 2008
    Messages:
    33
    Likes Received:
    6
    Occupation:
    Black hatter
    Location:
    TRS-80 Level II BASIC
    Home Page:
    LOL!
    Maybe another handful of Stimutacs and Marduk, slayer of Tiamat will give us the solution. :)
     
  4. undeterminederror

    undeterminederror BANNED BANNED

    Joined:
    Mar 31, 2008
    Messages:
    630
    Likes Received:
    457
    i use this and works fine in FF. never seen that dialog box.
     
  5. «ó«ô»ò» Lurk «ó«ô»ò»

    «ó«ô»ò» Lurk «ó«ô»ò» Newbie

    Joined:
    May 16, 2008
    Messages:
    33
    Likes Received:
    6
    Occupation:
    Black hatter
    Location:
    TRS-80 Level II BASIC
    Home Page:
    How do you do it?


    EDIT: Oh, I think you misunderstood. I want to frame a page that has the framebreaking javascript on it. In IE you can use the new security attribute to prevent the framed page from running javascript. Yahoo got busted doing this for their image search...
    There doesn't seem to be a similar solution to Firefox. A lot of the crowd that I wish to use this on are Firefox users. :(
     
    Last edited: Jun 10, 2008
  6. Essential Clix

    Essential Clix Executive VIP Premium Member

    Joined:
    Jul 30, 2007
    Messages:
    1,755
    Likes Received:
    2,791
    Location:
    USA
    moved to the JavaScript section
     
  7. KennWort

    KennWort Registered Member

    Joined:
    Apr 1, 2008
    Messages:
    68
    Likes Received:
    99
    Place this in the HEAD of the document:
    Code:
    <script type="text/javascript"> 
    function initialize()
    {
    if (self != top) top.location.replace(self.location.href); // Break frame
    }
    </script>
    This into the BODY tag:
    Code:
    onLoad="initialize();
    See if that does what you need.

    Oops...
    On re-read you do NOT want to break frames, you want to prevent frame breaking!
     
  8. chaoz

    chaoz Newbie

    Joined:
    Mar 13, 2007
    Messages:
    47
    Likes Received:
    12
    Home Page:
    i dont think that its possible ... maybe there is a specific browser bug
     
  9. R G B

    R G B Newbie

    Joined:
    Oct 28, 2008
    Messages:
    17
    Likes Received:
    2
    I found this method on a site when I was doing some coding and iframe breakers kept messing everything up >.<

    In header tags.
    Code:
    <script>
    function StopLoading()
    {
    if (!document.all)
    {
    window.stop();
    }
    else
    {
    window.document.execCommand('Stop');
    }
    }
    </script> 
    Then when you do an iframe make it use the function.
    Code:
    <iframe onload="StopLoading()" src="http://www.site.com"> 
     
  10. wealthy199

    wealthy199 BANNED BANNED

    Joined:
    Sep 24, 2007
    Messages:
    585
    Likes Received:
    1,088
    That code seems to stop the whole iframe from loading so isn't much use.
    + It didn't seem to work with a few sites (that have anti-iframe scripts).
     
  11. R G B

    R G B Newbie

    Joined:
    Oct 28, 2008
    Messages:
    17
    Likes Received:
    2
    Hmm well maybe I just got lucky because the site I used loads all the way. Whats a site that it didn't work on?
     
  12. wealthy199

    wealthy199 BANNED BANNED

    Joined:
    Sep 24, 2007
    Messages:
    585
    Likes Received:
    1,088
    Code:
    http://qualityhealth.com
    didn't work for me.
     
  13. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    I was thinking, if I can get this code, I could double my traffic