I have been working on my own script to keep a page in frames. I am calling with script with <body onLoad="checkFrames();">:
function checkFrames() {
if (top.location == self.location) {
self.location.replace("framepage.html");
}
return true;
}
This works great BUT I want it to keep the page that the visitor went to.
If it just replaced the page with the frameset page, suppose there was a frame named main. In frame "main" would be the default page which was in the frameset. I want the page that the visitor was at to generate frames, but then replace frame "main" with the new page.
I tried:
function checkFrames() {
siteBookmark = self.location.href;
if (top.location == self.location) {
self.location.replace("framepage.html");
parent.main.location.replace(siteBookmark);
}
return true;
}
I hope you understand what I am trying to say. Any ideas?
function checkFrames() {
if (top.location == self.location) {
self.location.replace("framepage.html");
}
return true;
}
This works great BUT I want it to keep the page that the visitor went to.
If it just replaced the page with the frameset page, suppose there was a frame named main. In frame "main" would be the default page which was in the frameset. I want the page that the visitor was at to generate frames, but then replace frame "main" with the new page.
I tried:
function checkFrames() {
siteBookmark = self.location.href;
if (top.location == self.location) {
self.location.replace("framepage.html");
parent.main.location.replace(siteBookmark);
}
return true;
}
I hope you understand what I am trying to say. Any ideas?