Friendster Court

It seems that you're not registered so pls. do so, but if you're already registered pls. login to use the full support of the forum!


We Serves the Ball of Simplicity for your Profile
 
HomeCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in



Disable Select Text/Copy/Drag and Drop Images

View previous topic View next topic Go down
Author Message
PatRicK
Admin
Admin
avatar


Age : 20 Registration date : 2009-01-17 Number of posts : 47

PostSubject: 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
}
Back to top Go down
View user profile http://profiles.friendster.com/70610066

Disable Select Text/Copy/Drag and Drop Images

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum: You cannot reply to topics in this forum
Friendster Court :: Other Stuffs :: Tutorials -