# Highlight text, copy text - disable

**URL:** <https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959>\
**Category:** Uncategorized\
**Created:** [April 25, 2006, 4:15pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959 "2006-04-25T16:15:55Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![audrius\_05](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@audrius\_05](https://forum.kirupa.com/u/audrius_05)\
**Post date:** [April 25, 2006, 4:15pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/1 "2006-04-25T16:15:55Z")

</div>

I’ve seen before on a non flash sites you can’t highlight text or copy text. is it a java script? can someone help. thanks

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 25, 2006, 5:13pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/2 "2006-04-25T17:13:10Z")

</div>

yes there are scripts that are able to do it [http://www.dynamicdrive.com/dynamicindex9/noright3.htm](http://www.dynamicdrive.com/dynamicindex9/noright3.htm)

Try googling it first 😉

Code does not work in Opera. FF and IE it works

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 25, 2006, 6:12pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/3 "2006-04-25T18:12:22Z")

</div>

@chris.jones: right, and that has nothing to do with not being able to highlite or copy text.

---

<div class="post-metadata">

**Author:** ![chrisclick](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/chrisclick/32/1991_2.png) [@chrisclick](https://forum.kirupa.com/u/chrisclick)\
**Post date:** [April 25, 2006, 7:25pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/4 "2006-04-25T19:25:53Z")

</div>

achually it does happen to fill 1 part of not being able to copy

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 25, 2006, 7:40pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/5 "2006-04-25T19:40:32Z")

</div>

no, because you can use ctrl+c.

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [April 25, 2006, 9:32pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/6 "2006-04-25T21:32:07Z")

</div>

[http://support.microsoft.com/?kbid=318086](http://support.microsoft.com/?kbid=318086)

---

<div class="post-metadata">

**Author:** ![bwh2](https://avatars.discourse-cdn.com/v4/letter/b/8c91f0/32.png) [@bwh2](https://forum.kirupa.com/u/bwh2)\
**Post date:** [April 25, 2006, 9:50pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/7 "2006-04-25T21:50:46Z")

</div>

> [@simplistik](#):
>
> [Microsoft Support](http://support.microsoft.com/?kbid=318086)

hmm. results are mixed at best

- worked in FF until i did ctrl+a, then copied the text.
- didn’t work in ie7 until i allowed blocked content
- didn’t work in opera

not sure about ie6, safari, etc. of course, view source will also not be stopped by this.

although, i’m not really sure why you would want to prevent highlighting anyway.

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [April 25, 2006, 10:06pm UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/8 "2006-04-25T22:06:56Z")

</div>

Is there a reason you don’t want people to be able to copy your text?

> [@bwh2](#):
>
> although, i’m not really sure why you would want to prevent highlighting anyway.

I’m with bwh2 on this one. It’s like trying to prevent people for saving images from your website. There are ways around both even if you try to prevent it. All a person would need to do is view the source of the page and your text is there.

My rule of thumb is, if I don’t want people to be able to use the information I put online, then I don’t put it online. 🙂

---

<div class="post-metadata">

**Author:** ![audrius\_05](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@audrius\_05](https://forum.kirupa.com/u/audrius_05)\
**Post date:** [April 26, 2006, 1:02am UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/9 "2006-04-26T01:02:29Z")

</div>

great this code worked like a charm, didn’t test in Opera thou, but netscape IE , Mozilla works great

```auto
<script language="JavaScript1.2">
//Disable select-text script (IE4+, NS6+)
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>

```

---

<div class="post-metadata">

**Author:** ![audrius\_05](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@audrius\_05](https://forum.kirupa.com/u/audrius_05)\
**Post date:** [April 26, 2006, 1:03am UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/10 "2006-04-26T01:03:46Z")

</div>

> [@Ankou](#):
>
> Is there a reason you don’t want people to be able to copy your text?
> 
> I’m with bwh2 on this one. It’s like trying to prevent people for saving images from your website. There are ways around both even if you try to prevent it. All a person would need to do is view the source of the page and your text is there.
> 
> My rule of thumb is, if I don’t want people to be able to use the information I put online, then I don’t put it online. 🙂

you can add another code that will not show source code 🙂

---

<div class="post-metadata">

**Author:** ![audrius\_05](https://avatars.discourse-cdn.com/v4/letter/a/3bc359/32.png) [@audrius\_05](https://forum.kirupa.com/u/audrius_05)\
**Post date:** [April 26, 2006, 1:05am UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/11 "2006-04-26T01:05:13Z")

</div>

> [@Ankou](#):
>
> Is there a reason you don’t want people to be able to copy your text?
> 
> I’m with bwh2 on this one. It’s like trying to prevent people for saving images from your website. There are ways around both even if you try to prevent it. All a person would need to do is view the source of the page and your text is there.
> 
> My rule of thumb is, if I don’t want people to be able to use the information I put online, then I don’t put it online. 🙂

Also I am using frames so they won’t be able extract text from source code,

---

<div class="post-metadata">

**Author:** ![Ankou](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ankou/32/1351_2.png) [@Ankou](https://forum.kirupa.com/u/Ankou)\
**Post date:** [April 26, 2006, 4:21am UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/12 "2006-04-26T04:21:28Z")

</div>

> [@audrius'05](#):
>
> you can add another code that will not show source code 🙂

There are ways around that…

> [@audrius'05](#):
>
> Also I am using frames so they won’t be able extract text from source code,

Frames… ugh. There are ways around that as well…

🙂 Don’t get me wrong I understand the reasons people use various techniques to try to prevent image and/or code theft, it’s just not my style. Adding more and more code just to prevent something like that makes little sense in my mind - and kind of defeats the purpose of using the internet. But I guess, to each his own.

Anyway I’m way off topic on this one, so… good luck. 🍺

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [April 26, 2006, 4:55am UTC](https://forum.kirupa.com/t/highlight-text-copy-text-disable/186959/13 "2006-04-26T04:55:49Z")

</div>

> [@bwh2](#):
>
> hmm. results are mixed at best
> 
> - worked in FF until i did ctrl+a, then copied the text.
> - didn’t work in ie7 until i allowed blocked content
> - didn’t work in opera
> 
> not sure about ie6, safari, etc. of course, view source will also not be stopped by this.
> 
> although, i’m not really sure why you would want to prevent highlighting anyway.

haha, nice… that was just my first google result 😃
