I did a little searching for javascript code that will make a page
"jump out" of frames when the page is loaded. There seems to be many,
many ways to do this and I've added the ones I found to the end of
this post.
Which one should I use? Is there a generally accepted "best" way to
do this that works will all browsers?
....
Krick
if (top != self) {
top.location = self.location;
}
if (window != top) {
top.location.hr ef = location.href
}
if (top.window != window) {
top.location.hr ef = window.location .href
}
if (parent.frames. length > 0) {
parent.location .href = location.href;
}
if (top.location != location) {
top.location.hr ef = document.locati on.href
}
if (parent.frames. length >= 1) {
window.top.loca tion.href = "index.html "
}
"jump out" of frames when the page is loaded. There seems to be many,
many ways to do this and I've added the ones I found to the end of
this post.
Which one should I use? Is there a generally accepted "best" way to
do this that works will all browsers?
....
Krick
if (top != self) {
top.location = self.location;
}
if (window != top) {
top.location.hr ef = location.href
}
if (top.window != window) {
top.location.hr ef = window.location .href
}
if (parent.frames. length > 0) {
parent.location .href = location.href;
}
if (top.location != location) {
top.location.hr ef = document.locati on.href
}
if (parent.frames. length >= 1) {
window.top.loca tion.href = "index.html "
}
Comment