Go Back  HTML Forums - Free Webmaster Forums and Help Forums > WEBSITE DEVELOPMENT > Client Side Scripting
User Name:
Password:
 

Reply
Thread Tools   Display Modes
  View First Unread
 
Old 10-31-2005, 05:33 PM
  #1
DYABLO
Fighter (Level 4)
 
Join Date: Sep 2005
Posts: 39
iTrader: (0)
DYABLO is an unknown quantity at this point
Disabling Highlight Text

How do you do something like this? CLICK HERE below "universal" u cant highlight any of that stuff how do they do that?
DYABLO is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-31-2005, 10:26 PM
  #2
birdbrain
Paladin (Level 15)
 
Join Date: Sep 2005
Location: I have a bijou perch
Posts: 315
iTrader: (0)
birdbrain is an unknown quantity at this point
Hi DYABLO,
Quote:
.... how do they do that?
Code:

<script language=JavaScript>
<!--

//Disable right click script III- By Renigade (renigade@mediaone.net)
//For full source code, visit http://www.dynamicdrive.com

var message="";
///////////////////////////////////
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
// --> 
</script>
....which, apart from being amateurish, is a toal waste of time.
I just disabled javascript in my browser and.......

Edit:
reason for edit typing error.

Last edited by birdbrain : 10-31-2005 at 10:42 PM.
birdbrain is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-31-2005, 11:19 PM
  #3
DYABLO
Fighter (Level 4)
 
Join Date: Sep 2005
Posts: 39
iTrader: (0)
DYABLO is an unknown quantity at this point
thanks birdman for your time, but is that just to disable the right click? what i wanted was the highlight to be disable as u can see in that site u are not able to highlight the text shown under "universal"
DYABLO is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 10-31-2005, 11:23 PM
  #4
_Aerospace_Eng_
The CSS Master (somewhat)
 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a galaxy far far away...
Posts: 11,154
iTrader: (0)
_Aerospace_Eng_ has disabled reputation
This thread has an example that brings up an alert box but at the same time it places a div over the content so it isn't highlightable. The content can still be seen through view source. If you really want to stop the highlight stuff then just use one big image for your site. What is your reason for wanting to do this? http://www.htmlforums.com/showthread.php?t=64642
__________________

76 invites left. PM me for a Gmail invite along with email addy.
Why we won't help you .::. Web Developer's Handbook .::. Why Tables for Layout is Stupid?
_Aerospace_Eng_ is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-01-2005, 12:37 AM
  #5
DYABLO
Fighter (Level 4)
 
Join Date: Sep 2005
Posts: 39
iTrader: (0)
DYABLO is an unknown quantity at this point
ill just disable the right click, i wanted to disable the highlight also cause my "friend" keeps copying and paste some of my stuff in his site. but thanks anyways for the help all of you. Ill be bothering you again soon for some other questions.
DYABLO is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Old 11-01-2005, 08:35 AM
  #6
scoutt
Mister Admin to you
 
scoutt's Avatar
 
Join Date: Jul 2001
Posts: 31,059
iTrader: (0)
scoutt is just really nicescoutt is just really nicescoutt is just really nicescoutt is just really nice
this is the script that disables highlight. it doesn't stop anybody cause all I did was turn off javascript to get by it.
HTML Code:
<script type="text/javascript">

/***********************************************
* Disable select-text script- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source 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
}

</script>
__________________
Have a Script or Snippet you want to share?

WWW Standards: HTML 4.01, CSS2.1, CSS3, XHTML 1.0
PHP Standards: PHP Standards
scoutt is offline   Add to del.icio.us Add to del.icio.us    Can you digg it?Can you digg it? Reply With Quote
Reply
KEEP TABS
SPONSORS
 
Boxedart

 
 


 
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
  
 
 
 



 
  POSTING RULES
 
 
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Thread Tools
Display Modes

Forum Jump

 

All times are GMT -5. The time now is 02:06 AM.

   

Mascot team created by Drawshop.com

Powered by vBulletin® Version 3.6.7
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.

Server Monitoring by ENIACmonitor 0.01
HTMLforums.com © Big Resources, Inc. Web Design by BoxedArt.com
vRewrite 1.5 beta SEOed URLs completed by Tech Help Forum and Chalo Na.