Home | Php | JavaScript | SQL | HTML | Server Admin | Tools
JavaScript
Welcome
History

Change Cell Color on Mouseover
Change Background Color
Break out of Frames
Change Cursor
Limit Input Text
Get Object By ID
Up/Down Buttons (Spinner)
Other sites
Image Editor
Top 10 web hosting reviews

Bust out of frames

If some other evil page is linking to you from within a frameset and knowingly or not they leave your page within their frame, you can now break out of that frame with a little bit of JavaScript. Here is the code to do so.

Example Code
<SCRIPT LANGUAGE="Javascript">
<!--
if (top.location != self.location) {
top.location = self.location;
}
//-->
</SCRIPT>


Simply include this code between your <HEAD> and </HEAD> tags at the beginning of your page, and it should do the trick. (As long as your visitors have JavaScript enabled in their browsers.)


Link back to this page

Copy and paste this HTML code into your page to link back to this very page:
     

Or just link to the WebCodingTech site:
     

And your link will look like this:
      Inspired by stuff found at www.webcodingtech.com.

Thanks!





Copyright © 2005 WebCodingTech.com Our URL is: http://www.webcodingtech.com