Author |
Message |
Darrell3831
Worker


Joined: Feb 18, 2004
Posts: 244
|
Posted:
Mon Oct 18, 2004 7:44 am |
|
Someone has put my nuke site within a frame on their site.
Where can I read up on how to break out of their frames automatically?
Thanks,
Darrell |
_________________ http://www.psy-center.com |
|
|
 |
JRSweets
Worker


Joined: Aug 06, 2004
Posts: 192
|
Posted:
Mon Oct 18, 2004 8:44 am |
|
I found this code, it says to place it in the page header.
Code:<s cript language="javas cript" type="text/javas cript">
if (self != top) {
if (document.images)
top.location.replace(window.location.href);
else
top.location.href = window.location.href;
}
</s cript>
|
Make sure you remove the space between "s" and "c" in the occurances of the word script.
I found it by this search on google...
http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=break+out+of+frameset |
Last edited by JRSweets on Mon Oct 18, 2004 9:31 am; edited 1 time in total |
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Mon Oct 18, 2004 8:57 am |
|
I would try placing it in includes/javascript.php first  |
|
|
|
 |
Darrell3831

|
Posted:
Mon Oct 18, 2004 9:12 am |
|
Thank you both.
It's working already.
Darrell |
|
|
|
 |
blith
Client

Joined: Jul 18, 2003
Posts: 977
|
Posted:
Mon Oct 18, 2004 9:47 am |
|
Darrell3831 wrote: | Someone has put my nuke site within a frame on their site.
Where can I read up on how to break out of their frames automatically?
Thanks,
Darrell |
How did you find this out? |
|
|
|
 |
Darrell3831

|
Posted:
Mon Oct 18, 2004 10:38 am |
|
Blith,
I was checking my referer log. I noticed a site I wasent familiar with and out of curiosity I went to see it.
They were kind enough to provide a link from their site to mine. But if you clicked on it. They put their frame around my site.
Kinda unprofessional if you ask me...
*shrugs*
Darrell |
|
|
|
 |
only1russ
New Member


Joined: Dec 23, 2004
Posts: 5
|
Posted:
Thu Dec 23, 2004 10:39 am |
|
Where do you put this in your header?
and how do you format it for php?
(To prevent being trapped in a frame)
-- Russ T |
|
|
|
 |
Darrell3831

|
Posted:
Thu Dec 23, 2004 11:52 am |
|
I put this code in includes/javascript.php. I did not actually format it for php. I simply dropped out of php, inserted the code, and jumped back into php.
Like this:
Code:##################################################
# Include for some common javascripts functions #
##################################################
?>
<s cript language="javas cript" type="text/javas cript">
if (self != top) {
if (document.images)
top.location.replace(window.location.href);
else
top.location.href = window.location.href;
}
</s cript>
<?
|
Every place that the word s c r i p t appears in my example has a space inserted betwen the s and the c. Take that space back out if you plan to copy/paste my example.
Darrell |
|
|
|
 |
only1russ

|
Posted:
Thu Dec 23, 2004 1:18 pm |
|
So how would I drop out of php and then back? |
|
|
|
 |
Darrell3831

|
Posted:
Thu Dec 23, 2004 2:04 pm |
|
My code up above minus the spaces where mentioned is the way.
the
?>
stops proccessing php commands and goes back to htm stuff.
then the
<?
returns back to php stuff.
Darrell |
|
|
|
 |
only1russ

|
Posted:
Thu Dec 23, 2004 2:13 pm |
|
aarraaggg the simplest things...
thanks for the lesson... |
|
|
|
 |
|