I'm trying to disable the text selection and print-key functions on a couple page of my web site using the code below:
PHP Code:
/***********************************************
* Disable Text Selection script- 
***********************************************/
function disableSelection(target){
if (
typeof target.onselectstart!="undefined"//IE route
 
target.onselectstart=function(){return false}
else if (
typeof target.style.MozUserSelect!="undefined"//Firefox route
 
target.style.MozUserSelect="none"
else //All other route (ie: Opera)
 
target.onmousedown=function(){return false}
target.style.cursor "default"
}
/***********************************************
* Disable Print Screen
***********************************************/
function do_err()
    {
        return 
true
    
}
onerror=do_err;
function 
no_cp()
    {
        
clipboardData.clearData();setTimeout("no_cp()",100)
    }
no_cp(); 


It works great, except that in IE7, the user is constantly prompted with a message asking if you want to allow the clipboard to copy content, etc., and depending on what you answer, you can actually get around the scripts.

Does anyone know of a work-around, or code adjustment that would work in IE7?