Forum Moderators: open

Message Too Old, No Replies

Putting orphan pages into their frameset

Revisiting the topic with a new question

         

jdkuehne

7:28 pm on Jan 11, 2005 (gmt 0)

10+ Year Member



The code referenced here:
[webmasterworld.com...]
works great for me when the orphan page is in the top level of the domain, but I cannot get it load the "master" frameset when the orphan resides in a subdirectory. I just don't know enough JavaScript to figure this one out. Can anyone help?

[edited by: tedster at 7:59 pm (utc) on Jan. 11, 2005]
[edit reason] fixed url [/edit]

tedster

8:06 pm on Jan 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This line in the <head></head> element should be the key:

top.location.href="master.html?" + passpage

For "master.html?" use the absolute address of your master page ( http://www.example.com/master.html? ). Then no matter how deep or shollow in the dirctory structure your orphaned page is, the same script will work.

jdkuehne

8:48 pm on Jan 11, 2005 (gmt 0)

10+ Year Member



Thanks for the reply, Tedster. I've tried your suggestion but it still doesn't work. I've got a live page with the script in the head at
http://www.example.com/ace/sales-a/ace_line.shtml
and my master page is at
http://www.example.com/ace/master.html

It seems like the script doesn't even try to load the master page. Maybe top.location is not equal to self.location in this instance?

jdkuehne

<Sorry, no example URLs. See TOS [webmasterworld.com]>

[edited by: tedster at 10:06 pm (utc) on Jan. 11, 2005]

tedster

10:18 pm on Jan 11, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Make sure you have your javascript console turned on in the browser - and see where it says the error is.

In Explorer 6 that's under Tools > Internet Options > Advanced and then make sure that "Disable script debugging" is not checked.

Javascript is rightly quite touchy about proper syntax - not nearly so forgiving as browsers are with HTML. Make sure your code has the same line breaks that are on the example page [webmasterworld.com].

You said you had this working elsewhere - maybe you can just copy/paste the working code and then change only the "master.html?" part.