[Javascript] locking contents

Matt Barton javascript at mattbarton.org
Fri Jan 16 03:43:43 CST 2004


Hi,

I'm not sure that there's anyway you can do this.  You could take all kind
of measures to try it, such as forcing the page to open in a new browser
window with no menu or toolbar and using the onContextMenu event to
disable the right click View Source option.  You could also use the
onSelectStart (and associated events) to disable the selection of text to
avoid copy & paste.

But even with all of that any visitors using a Windows OS (and doubtless
others) will be able to hit the 'Print Screen' keyboard button and paste
the resulting image into a image editor and print it from there - you can
have no control over that with a scripting language in a browser.

Matt

>Hi.
>
>I have to prevent that users who browse my HTML pages can do:
>- select and copy the contents
>- print the contents
>- save the html page
>- edit source
>
>Bassically they can only view the contents.
>Is anything od this possible?
>The content of a page is a set of exam questions that should't be copied,
>printed ecc. I know that there's always printscreen...
>
>Thanks.
>
>Sebastian
>
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript
>
>--
>This email has been verified as Virus free
>Virus Protection and more available at http://www.plus.net
>
  



More information about the Javascript mailing list