The SitePoint Forums have moved.

You can now find them here.
This forum is now closed to new posts, but you can browse existing content.
You can find out more information about the move and how to open a new account (if necessary) here.
If you get stuck you can get support by emailing forums@sitepoint.com

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

i have seen this and have used it myself but cannot
remeber a darn thing about it cept thta it works

i want the browser to test wether or not a page that is
called is beieng called from within the specified window
the script is originally used to prevent a page within a frame to be called alone it redirected the user
to the main window if i can call it that so that parts of
your frames could not be viewed alone

i have managed to secure most of my site
no rightclicks can be performed and no options to view
source code by using a chromeless window the problem now
is that i wanna make sure that someone cannot call a page
into a normal browser window by using shift while clicking
on links thus preventing anyone from getting to my source code....

hehe thanks for the ermmmm less than wanted reply
ever hear of the saying if you can't say something good shut the hell up?

first off i'm a writer, painter, muso, ect
all and all artist now i have a whole book
published on my site something wich i would not apreciate
getting stolen
second i have alot of images done by myself that i would not like to see plastered all over the web as someone elses
thirdly my site is designed not to be accesible if java is
not enabled so i can't really give a flying hoot
and if anyone wishes to get info on the code used to
perform the tasks done on my site they can gladly email me
and it is stated so

i have spent 8 years creating the art and writting on my
site and aint about to hand it over to the masses
so if you don't mind i'll continue with my quest
to keep the kiddies outta my stuph if you don't mind

If having your content stolen is of legitimate concern to you, I hate to say it, but putting your content on the Web might not be the best idea...

Perhaps if you provided low-resolution samples of your art and excerpts of your book, you could then sell access to the genuine articles.

Unfortunately, although he didn't put it very diplomatically, goober has a point. The way the Web works, there is no secure way to make something available without allowing people to use it themselves. Anti-rightclick scripts and referrer checks will work on the surface, but anyone who really wants something from your site can just switch off their JavaScript at a convenient moment, use their browser's view-source command (or use a view-source: URL), or just copy it out of their browser's cache.

Here at SitePoint our content is our livelihood, but despite the fact that we have no safeguards against the pilfering of that content, we have only ever had to deal with one case of content theft.

A clearly-stated copyright notice is as big a deterrent as a crippling script. Such safeguards actually only tend to encourage thieves, who like to feel like they've outsmarted you by circumventing such measures.

Now, all that said, I'm still willing to answer your original question.

Where 'errorpage.html' is the page you'd like to display when someone attempts to display the document outside your frameset. Don't make the message too unfriendly, because it could result from something as innocent as a "open link in new window" command.

prevention is better than cure

You're quoting out of context. That saying's meaning is roughly equivalent to "it's better to take vitamins to stay healthy than it is to have to get over a cold." Prevention in this case would be not putting your valuable content online so that you didn't have to pursue people who stole it (the cure). I'm afraid the above script is only a placebo. Anyone who wanted to use your content out of context could just put that variable on their own page.

Originally posted by reaperofface
now i have a whole book published on my site something wich i would not apreciate getting stolen

Talk to adobe about e-paper solutions.

second i have alot of images done by myself that i would not like to see plastered all over the web as someone elses

these can be nicked by putting the complete url to the image in a download manager or in a web browser. Get a digital watermark from Digimark or the like and bung it in to your images using photoshop.

thirdly my site is designed not to be accesible if java is
not enabled.

Dubious.

hehe thanks for the ermmmm less than wanted reply
ever hear of the saying if you can't say something good shut the hell up?

first off i'm a writer, painter, muso, ect
all and all artist now i have a whole book
published on my site something wich i would not apreciate
getting stolen
second i have alot of images done by myself that i would not like to see plastered all over the web as someone elses
thirdly my site is designed not to be accesible if java is
not enabled so i can't really give a flying hoot
and if anyone wishes to get info on the code used to
perform the tasks done on my site they can gladly email me
and it is stated so

i have spent 8 years creating the art and writting on my
site and aint about to hand it over to the masses
so if you don't mind i'll continue with my quest
to keep the kiddies outta my stuph if you don't mind

FOURTH AND FINNALLY don't take that tone with people who try to help you. It just makes you look like an uptight ****, and is the kind of tonal attitude, and talking down that encourages unscrupulous people to steal from you in the first place.

well i'm sorry if the tone seemed offensive
but i felt offended by the tone of the first reply
.
secondly i figured that if i protect my site in the
way it now is that anyone able to steal anything
is too advanced in pc's for me to worry that they'll
wanna use my stuph for themselves anyways
.
just wanna keep the average joe from taking mys stuph and
that i have done
.
i bet that if most anyone on this forum would want to steal
something from a site such as mine they will be able to
find a way
.
but i'd like to know that the protection on my site
is the best i can have
.
i would be more than happy to give the url of the site as
soon as it's all done i'm still having a bit of trouble
with the basics lol... and then it will be seen that having
java turned off will not alow you in the site in the first
place
.
of course there are ways around this and i'm aware of that
but it's hiden from most everyone... that was all i aimed
to do... i'm not trying to deter anyone from getting in my code... i mean most of the things i use comes from forums
like these anyways so how can i proclaim it to be mine
but i'll sleep alot easier knowing that my art isn't
plasterd on some 4 year old desktop