Quote:
|
Originally Posted by SmokeyTheBear
<script>
if (top.location != location) {
top.location.href = 'http://www.yoursite.com' ;
}
</script>
|
Not trying to be annoying or anything: (ok perhaps a little)
While this will work because top.location will return null, it will actually produce a warning in IE because it cannot access the location property on another domain.
A cleaner approach would be something like this:
Code:
<script type='text/javascript'>
<!--
if(top && top != this) {
top.location.href = this.location.href;
}
//-->
</script>