Home | Top Skins | Tags | All Skins | Forums | Contribute | About

BlogSkins.com Forums

Forums > Tips & Tricks > "Codes to disable right click and select text are H" (9 replies)
sleepygurl's icon Author: sleepygurl
Posted: 2.9 years ago
(link)
This is the codes to diable select text:

[script language="JavaScript1.2"]

//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit www.dynamicdrive.com for this script

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false" )

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
[/script]

Please change all the [square brackets] to the sharp brackets

--------------------------------------------------------------------------------------------------------------------------------

This is to disable right click:

[script type="text/javascript"]
[!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit www.dynamicdrive.com

var message="No clicky";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false" )

// --]
[/script]


Please change all the [square brackets] to the sharp brackets
You may also want to change the words in Bold and Underline

Edited 2.9 years ago.
 
 
kapil030786's icon Author: kapil030786
Posted: 2.9 years ago
(link)
  is it true, if yes such nice post thanks. for the sharing.
-------
FriendyAnil
 
 
LucasFerrera's icon Author: LucasFerrera
Posted: 2.8 years ago
(link)
  ok... thanks for posting this..
 
 
eshaTM's icon Author: eshaTM
Posted: 2.8 years ago
(link)
  thnx for posting! I LOVE these codes
 
 
nightcurt's icon Author: nightcurt
Posted: 2.8 years ago
(link)
  the disable select text is not working for me...
i went to some of my friend's blog(they got put the code)
but still can select text...
 
 
sarinakatz's icon Author: sarinakatz
Posted: 2.7 years ago
(link)
  Very helpful.
Thank you
 
 
illain's icon Author: illain
Posted: 2.7 years ago
(link)
  FFOX TOO?!
 
 
eewaka0125's icon Author: eewaka0125
Posted: 2.7 years ago
(link)
  where shud i apply this.
UNder my css code . or on top my layout codes?
 
 
}` PHYLLIS's icon Author: }` PHYLLIS
Posted: 2.5 years ago
(link)
  Thanks so much for sharing , (:
 
 
han.zecheng's icon Author: han.zecheng
Posted: 2.4 years ago
(link)
  NOTHING

Edited 2.4 years ago.
Subscribe To This Thread: RSS 2.0 or Atom (?)
This thread has been locked, and no new replies can be posted.


Site

- Home
- About
- Feeds
- Privacy Policy
- Contact Us

Skins

- Tags
- Search Skins
- All Skins
- Random Skin
- Skin Of The Day
- Contribute

Forums

- General
- Tips & Tricks
- Help!
- Suggestions
- Skin Requests
- Blogging Software
- Web Hosting

Account

- Log In
- Register
</BlogSkins>

Warning! Do not follow this link! It is a trap for poorly-behaved bots. If you follow this link, you will be banned from accessing this site and several others. I will not have mercy on you. Do not follow this link!