Re: detecting whether frame is top one and in case it isn't redrawing it as top
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: detecting whether frame is top one and in case it isn't redrawing it as top

From: </dev/null@localhost.ld>
Date: Wed Nov 30 2005 - 00:13:31 CET

/dev/null@localhost.ld wrote:

> I tried soemthing like:
>
> if (top != self) top.location.href = self;
> or
>
> if (window == top) top.location.replace("index.html");
>
> doesn't work.
>
> tia.

Ok, I've got this working:

if(window.top!=window.self) window.top.location=window.self.location;
Received on Sat Dec 3 04:33:00 2005