Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Break Out Of Frames - FF
Does anyone have a sure fire way to break out of frames?
I have a standard JavaScript that's served me well for years but it appears that Firefox (on Mac OS X at least) ignores it.
I have an enhanced (.m4a) podcast playing in an iFrame on my forum which works a treat, however when you click a link, it opens inside the small 230x220 pixel iFrame, not a good look.
In Safari and Exploder, the link opens inside the iFrame for a second then breaks out to the full page as the JavaScript says to.
Anyone have a clue for me?
I have a standard JavaScript that's served me well for years but it appears that Firefox (on Mac OS X at least) ignores it.
I have an enhanced (.m4a) podcast playing in an iFrame on my forum which works a treat, however when you click a link, it opens inside the small 230x220 pixel iFrame, not a good look.
In Safari and Exploder, the link opens inside the iFrame for a second then breaks out to the full page as the JavaScript says to.
Anyone have a clue for me?
0
This discussion has been closed.
Comments
<script language="JavaScript"> if(parent.frames.length>=1 { window.top.location.href="index.html" } </script>
I see nothing there about breaking out of frames. :-(
There is a closing brackett missing, after ">=1".
<script language="JavaScript"> if(parent.frames.length>=1) { window.top.location.href="index.html" } </script>
Bye
Tiggr
I'm using this on my sites:
<script type="text/javascript"> if (top.frames.length != 0) top.location= self.document.location; </script>
Seems to work in all browsers...
Bye
Tiggr
if(location != top.location) top.location.href = location.href;
Tiggr I found a variation on your suggestion, seems to work on all browsers I have tested...
<script language="javascript" type="text/javascript"> if (parent.frames.length > 0) { parent.location.href = self.document.location; } </script>
parent.frames or top.frames ?
Thanks all.