RE: [PHP] Stoping Frame Breakers
| From: | Brinkman, Theodore | Date: | Fri, 20 Jul 2001 21:50:27 +0000 |
| Subject: | RE: [PHP] Stoping Frame Breakers | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-58979@lists.php.net to get a copy of this message | ||
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:webmaster@foxjet.com]
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 <sjdtmv@tpg.com.au>
To: <php-general@lists.php.net>
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