Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1182 Is there a way to disable the cut and copy function?

irt.org | Knowledge Base | JavaScript | Event | Q1182 [ previous next ]

Q1182 Is there a way to disable the cut and copy function?

Try:

<head>

<script language="JavaScript1.1"><!--
function mouseup(e) {
    if (document.layers) {
        if (!window.find('Please do not cut and paste.',false,false))
            window.find('Please do not cut and paste.',false,true);
    }
    else if (document.all) {
        var rangeText = document.body.createTextRange();
        window.findText('Please do not cut and paste.');
    }

    return true;
}
document.onmouseup=mouseup;
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmouseup=mouseup;
//--></script>

</head>

<body>

<!-- place your content after this line -->

<p>
<img src="picture.gif" width="100" height="100">
</p>

<p>
some text
</p>

<p>
<a href="somewhere.htm">text link</a>
</p>

<!-- and before this line -->

<p>
Please do not cut and paste.
</p>

</body>
</html>

It is still possible to use CTRL+A (for marking all text) and then CTRL+C (for copying all marked text) and CTRL+V for pasting in Internet Explorer.

With Netscape Navigator, simply choose Edit, then Select All, and finally Copy.

Feedback on 'Q1182 Is there a way to disable the cut and copy function?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 6th July 2009. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2009 irt.org, All Rights Reserved.