Computer Hope

Other Pages

Home
Site map
Computer help

Dictionary
News
Q&A
What's new

Tools

E-mail this page
Print Preview
Edit this page




Reference number: CH000079

Creating script to break web page out of frames.

Issue:

Creating script to break web page out of frames.

Solution:

Place the below script in the <HEAD></HEAD> section of your HTML.

<script>
<!--
if (top.location != location) { top.location.href = location.href; }
//-->
</script>

Alternatively if you wish to create a link for users to break out of a frame on your website you can add the below example.

<A href="http://www.computerhope.com/" target="_top">Break out of frame</a>

Using either of the above examples will automatically break users out of any frame that links to your page. Keep in mind that some web services such as services that translate your web page into another language may no longer work because of the need of a frame.

Finally, users who have JavaScript disabled will not be taken out of a frame using the first example.

 

 

 

 

Index

Category:
HTML Q&A

Companies:
None

Related Pages:
HTML Help

 

Resolved

Were you able to locate the answer to your questions?

Home - Computer help - Contact - Dictionary - Links
Link to Computer Hope - Bookmark Computer Hope