script for iframe redirect needed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

is there a java script or something similar that will make it that if
someone ends up on an iframe page (the frame itself) he will always be
redirected to the full page where the iframe is embedded instead of getting
just the iframe content?

Thank you!
 
Hi Mstar,

I use:
<body onload="detect();"> in every frame page

where detect is a JS function in a file which is linked into every frame
page by the code:
<script type="text/javascript" src="scripts/external.js"> </script> in the
<head> section

In external.js:
function detect()
{ var framesetpage = "index.html"
if (parent.location.href == window.location.href)
parent.location.href = framesetpage}

and where "index.html" is the full page where the frame is embedded

I use frames not iframes but the theory should be the same.

--
Cheers,
Trevor L.
Website: http://tandcl.homemail.com.au
Hi,

is there a java script or something similar that will make it that if
someone ends up on an iframe page (the frame itself) he will always be
redirected to the full page where the iframe is embedded instead of
getting just the iframe content?

Thank you!


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
Back
Top