For the record:
If you check the HTML spec, you'll discover that <SCRIPT> tags aren't
allowed within <HEAD> tags. Most browsers handle them, but YMMV. (Last
time I tested it, Mozilla (aka Netscape 6) didn't even display pages with
scripts in the header because it's invalid html. I couldn't convince anyone
that it was important enough to fix, either.)
- Theo
-----Original Message-----
From: Sheridan Saint-Michel [mailto:[EMAIL PROTECTED]]
Sent: Friday, July 20, 2001 10:27 AM
To: php-general
Subject: Re: [PHP] Stoping Frame Breakers
I would actually suggest JavaScript, rather than PHP here.
Try putting something like
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
if (parent.location != "http://www.domain.com/frames.php")
window.location = "http://www.domain.com/frames.php";
</SCRIPT>
In the <Head> of your framed pages (not you frameset page)
Note: If your Frameset page is a default page (You can get to it
using either domain.com/frames.php or domain.com/) you need to
change the script to
<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
if (parent.location != "http://www.domain.com/frames.php" &&
parent.location != http://www.domain.com/")
window.location = "http://www.domain.com/";
</SCRIPT>
Let me know if that helps!
Sheridan
----- Original Message -----
From: ReDucTor <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 19, 2001 10:21 PM
Subject: [PHP] Stoping Frame Breakers
hey,
Does any one know how to stop people breaking frames?!?
- James "ReDucTor" Mitchell
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]