How to prevent the copying of text from a textarea?
Posted
by
think123
on Stack Overflow
See other posts from Stack Overflow
or by think123
Published on 2012-04-09T08:52:18Z
Indexed on
2012/04/09
23:30 UTC
Read the original article
Hit count: 271
I have an online typing software, which I'm currently working on. In the typing software, all is running good but I have come across the problem of dishonest users who might possibly type the text into the textarea, copy it, then reload the page (therefore resetting the timer) and pasting it in straightaway. So I was thinking along the lines of using something like evt.preventDefault();
when javascript detects the pressing of the ctrl / cmd button. But then again I realized that the user could go to the menu bar to press copy. So is there a cross-browser method to do both methods of disabling?
Thanks,
Lucas
EDIT: Please forgive me if I wasn't clear. Please comment on where I wasn't, and I will strive to improve the quality of my questions.
© Stack Overflow or respective owner