FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum » How To » Breaking out of frames
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Breaking out of frames [message #30181] Thu, 09 February 2006 18:17 Go to previous message
treebeard is currently offline  treebeard   United States
Messages: 44
Registered: April 2004
Location: Huge Universe
Karma:
Member
Recently another site "hijacked" our forum by framing it in a frameset with only one frame, src=our forum url. I added a bit of javascript to break out of the frame:

<Script Language="JavaScript">
<!--
setTimeout ("changePage()", 0);
function changePage() {
if (self.parent.frames.length != 0)
self.parent.location= "index.php";
}
// -->
</script>

This should only check to see if the page is in a frame, and if so, break out to the self parent location. And it worked. However, several users started to complain about odd forum behavior, getting bounced back to the homepage, etc. So really two questions:

1) Is there a better way to prevent another site from framing the forum?

2) Why would this javascript cause problems if you're NOT browsing the forum in a frameset?

Thanks!
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: UNABLE TO WRITE TO SQL LOG FILE
Next Topic: Import Data
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 22 07:14:06 GMT 2024

Total time taken to generate the page: 0.06385 seconds