Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission Denied breaking out of frames...

Status
Not open for further replies.

martindavey

Programmer
Jan 2, 2000
122
GB
Hi,
I'm attempting to break out of frames using the following code. However, I get permission denied.
How do I get round this?

<script language=&quot;javascript&quot;>
<!--
function fncBreakOutOfFrames() {
if (top.document.location.href != document.location.href) {
top.document.location.href = document.location.href;
}
}
//-->
</script>
</head>

<body onLoad=&quot;fncBreakOutOfFrames();&quot;>

 
found this on the web:

<SCRIPT LANGUAGE=JavaScript>
<!--
if (top.frames.length!=0)
top.location=self.document.location;
// -->
</SCRIPT>
=========================================================
if (!succeed) try();
-jeff
 
The following also works
Code:
<script language=&quot;JavaScript&quot; type=&quot;text/javascript&quot;>
<!-- Hide script from older browsers 
if(parent.frames[1])
parent.location.href=self.location.href;
// end hiding contents -->
</script>
Regards
Ian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top