Forum Moderators: open
On the new version of my site there is a method that one can unintentionally load the frameset (parent) inside of itself.
Generally you could just throw a script element on the frameset page itself however Opera has a nasty XHTML bug where it will show absolutely nothing but a blank white page when an XHTML frameset is served correctly as application/xhtml+xml.
No, I'm not going to remove the media type/mime and no I won't consider dropping Opera support or anything like that.
I've made a few attempts such as counting the parent.parent.length, use object detection (if (parent.parent)), and searching what properties are available to experiment with to determine if the "parent" is or is not the parent-most parent...so to speak.
Thoughts please?
- John
- John
window.onload = function()
{
if (parent.document.getElementById('frame_content'))
{
if (parent.window.self != parent.window.top)
{
window.parent.location.href=window.parent[1].location.href;
}
}
}