Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

Firefox passes relative URL incorrectly

Firefox parses an extra level into the URL

8:02 pm on Jan 17, 2005 (gmt 0)

Junior Member

10+ Year Member

joined:Jan 11, 2005
votes: 0

I am using a JavaScript to reframe orphan pages that live in the first subirectory below the primary. The code is:

passpage = document.URL
if (top.location == self.location)
top.location.href="../master.html?" + passpage

IE, Opera, Mozilla, and others parse this correctly as:


Firefox gives me:


Has anyone else run into this? Are there any solutions? Thanks


[edited by: tedster at 8:16 pm (utc) on Jan. 17, 2005]
[edit reason] use example.com [/edit]

8:34 pm on Jan 17, 2005 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
votes: 0

Do you mean you're getting the wrong URL for example.com/sub/master.html?

How about using the absolute URL for top.location.href - then no matter how deep your orphan pages may be in the directory structure, the same script will always find master.html