View Single Post
Old 09-14-2006, 07:17 AM  
SmokeyTheBear
►SouthOfHeaven
 
SmokeyTheBear's Avatar
 
Join Date: Jun 2004
Location: PlanetEarth MyBoardRank: GerbilMaster My-Penis-Size: extralarge MyWeapon: Computer
Posts: 28,609
Quote:
Originally Posted by sixsax
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>

good point..
__________________
hatisblack at yahoo.com
SmokeyTheBear is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote