Is there javascript or code to CLOSE the current window if the PRINT SCREEN key is pressed?

M

Marcello do Guzman

I have a website with some information that I don't want others to
copy using the PRINT SCREEN key on their keyboard. This copies the
screen image and could later be printed. I want to close the webpage
immediately what the PRINT SCREEN key is depressed. Please include
where I would place the code. I can prevent people from SELECTING
ALL, RIGHT CLICKING and PRINTING, but the PRINT SCREEN function is
still available, Any help would be great appreciated. Please post
here or email to:

(e-mail address removed)
 
S

Steve Easton

Actually there was a script that will attempt to disable Print Screen.
However, I'm not sure it will work with the newer browsers with the security updates.
When I tried it, it locked up the browser requiring the 3 finger salute to close it.

Use at your own risk and try it in other browsers before publishing.

<body onload=setInterval("window.clipboardData.setData('text','')",20) oncontextmenu="return false"
onselectstart="return false">

That said. Even if you use it, all a viewer has to do is open their temporary internet files,
retrieve the page and open it in Notepad.

--
Steve Easton
Microsoft MVP FrontPage
95isalive
This site is best viewed............
........................with a computer
 
M

Mike Mueller

Not possible to stop

No CSS codes or javascripts will prevent someone from taking
something from your website if they want it


message :I have a website with some information that I don't want
others to
: copy using the PRINT SCREEN key on their keyboard. This
copies the
: screen image and could later be printed. I want to close
the webpage
: immediately what the PRINT SCREEN key is depressed.
Please include
: where I would place the code. I can prevent people from
SELECTING
: ALL, RIGHT CLICKING and PRINTING, but the PRINT SCREEN
function is
: still available, Any help would be great appreciated.
Please post
: here or email to:
:
: (e-mail address removed)
 
R

Ronx

Do your security arrangements work in a browser where client side scripting
is turned off?
 
K

Kevin Spencer

You're wasting your time (and ours). The question of protecting a web site's
HTML code and/or images has been exhaustively covered in this newsgroup, and
all over the Internet. Thousands of others before you have tried to come up
with some clever way of stopping people from copying data that they already
have on their computer by virtue of how the WWW works, which is that a
browser is an HTTP client utility that downloads resources from a server.
You name it, they've thought of it. Welcome to the club.

And, oh, by the way, in case you haven't figured it out yet, the answer is
IT IS IMPOSSIBLE.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 
X

xfile

Hi:

I don't mean to join the discussion, but I saw similar topics often.

I am just curious for why people wouldn't want others to print the pages but
want to put them on the site for public to view?

Are there any special reasons for that? Thanks.
 
K

Kevin Spencer

I am just curious for why people wouldn't want others to print the pages
but want to put them on the site for public to view?

Are there any special reasons for that? Thanks.

Ignorance is the only reason I can think of. By definition, the word
"publish" means "to make public." If it were possible to copy-protect
published materials, we wouldn't need copyright laws!

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
Neither a follower nor a lender be.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top