[thelist] window.nav??

Goldilox Goldilox at teachnet.edb.utexas.edu
Tue Oct 30 15:01:10 CST 2001

I found a piece of JavaScript code:
someLoc = window;
someLoc.nav = nav = window;

and I'm trying to understand what it does.
Here is my page:
someLoc = window;
someLoc.nav = nav = window;
If I do this:
someLoc = window;
someLoc.location = location = window;

The URL location stays the same, but the page disappears (and becomes a "page
not found" error). Almost as if a frame had been created within the page, but
the frame cannot find its content.

If I do:
someLoc = window;
someLoc.alert = alert = window;

I get the error "Member not found"; Which means there is an object within an
object, right? I thought alert was a method; can a method be an object?

But if I create a div called nav and a class called nav, someLoc doesn't effect
them at all. 

someLoc = window;
someLoc.nav = nav = window;

works as if the 'nav' in 'someLoc.nav' was never there. Yet if my page is a
frame named 'nav', the code won't designate the page named 'nav' as the target
of the code. Is this piece of code I found just obfuscated code?
Can someone help my feeble mind here?


More information about the thelist mailing list