Welcome to WebmasterWorld Guest from 54.162.227.136

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)

10+ Year Member



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:

http://www.example.com/sub/passpage

Firefox gives me:

http://www.example.com/sub/sub/passpage

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

jdkuehne

[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)

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



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

 

Featured Threads

Hot Threads This Week

Hot Threads This Month