Skrevet av Emne: How to write a Javascript frame buster  (Lest 2295 ganger)

ATC

  • Gjest
How to write a Javascript frame buster
« på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • When authoring HTML pages, it sometimes becomes necessary or desirable to prevent the page from appearing inside (someone elses) frame set.



    ATC

    • Gjest
    [Solved] How to write a Javascript frame buster
    « Svar #1 på: 27. ſeptember 2008, 18:24 pm »
  • [applaud]0
  • [smite]0
  • Include the following HTML code somewhere in the document. The script does not need additional configuration, and it can go in the BODY section if you want:

    <SCRIPT LANGUAGE=JavaScript>
    <!--
      if (top.frames.length!=0)
       top.location=self.document.location;
    // -->
    </SCRIPT>