You are here: irt.org | FAQ | JavaScript | History | Q104 [ previous next ]
It still won't work. The history object will NOT divulge the location of any of the entries. This is a security issue. Netscape and Microsoft are very keen to ensure that people can't have hidden frames or windows that sit around and monitor where people are browsing, because the danger is that that information could be sent by email or cgi to someone else.
The downside of this is that you cannot get the location of a document in another frame, where that document is from another server - unless of course you already knew the location because you placed the document in that frame.
The only way you'll get this to work is if you find a bug in the browser, in which case it'll not work on all browsers, and when revealed the bug will need to be fixed by the software vendor.
The following was pointed out to me by John Marshall:
In Navigator 4 you CAN get the href of a frame page from another domain by using:-
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead")
before you request it with lines like:-
alert(top.frames[0].location.href)