PatRicK
Admin
Age : 27
Registration date : 2009-01-17
Number of posts : 47
|
Subject: Disable Select Text/Copy/Drag and Drop Images Sat Jan 24, 2009 3:03 pm |
|
|
Simply compile/paste this code in your JS file
If you don’t know what is JS is, Go to Compiling JS File Tutorial
Code: - Code:
-
//form tags to omit in NS6+: var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){ if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1) return false }
function reEnable(){ return true }
if (typeof document.onselectstart!="undefined") document.onselectstart=new Function ("return false") else{ document.onmousedown=disableselect document.onmouseup=reEnable } |
|