Gordo
12-31-2002, 10:24 PM
I'm using joh6nn's code from this archived post (http://www.codingforums.com/ubb/Forum4/HTML/009362.html). So you don't have to click the link, joh6nn says the following:this first part goes in the page, where you create your frames. ie, frames.htm
<SCRIPT>
function frame_saver()
{
if (self.location.search)
{
self.FRAMENAME.location = "http://www.DOMAIN.com" + self.location.search.slice(1);
}
}
self.onload = frame_saver;
</SCRIPT>
this second bit goes in any frames that don't change, like frames you use for navigation.
<SCRIPT>
if (self == top) {self.location = "http://www.DOMAIN.com/frames.htm"; }
</SCRIPT>
this last part goes in all of the pages that are in the main frame; the ones that you want to be able to bookmark.
<SCRIPT>
if (self == top)
{
var url = self.location.pathname;
self.location = "http://www.DOMAIN.com/frames.html?" + url;
}
</SCRIPT>I'm missing something because it's not working quite right. If I had to guess, I'd say I'm incorrectly replacing the FRAMENAME in the code that is placed on the framed page (the first bit of code). Instead of loading the targetted page in the proper frame, it simply loads the default home page.
Upon typing in http://www.jimthomasstudio.com/figurative.htm, I get http://www.jimthomasstudio.com/index.html?/figurative.htm. I'm thinking that forward slash is killing the figurative.htm portion.
Any help?
<SCRIPT>
function frame_saver()
{
if (self.location.search)
{
self.FRAMENAME.location = "http://www.DOMAIN.com" + self.location.search.slice(1);
}
}
self.onload = frame_saver;
</SCRIPT>
this second bit goes in any frames that don't change, like frames you use for navigation.
<SCRIPT>
if (self == top) {self.location = "http://www.DOMAIN.com/frames.htm"; }
</SCRIPT>
this last part goes in all of the pages that are in the main frame; the ones that you want to be able to bookmark.
<SCRIPT>
if (self == top)
{
var url = self.location.pathname;
self.location = "http://www.DOMAIN.com/frames.html?" + url;
}
</SCRIPT>I'm missing something because it's not working quite right. If I had to guess, I'd say I'm incorrectly replacing the FRAMENAME in the code that is placed on the framed page (the first bit of code). Instead of loading the targetted page in the proper frame, it simply loads the default home page.
Upon typing in http://www.jimthomasstudio.com/figurative.htm, I get http://www.jimthomasstudio.com/index.html?/figurative.htm. I'm thinking that forward slash is killing the figurative.htm portion.
Any help?