PDA

View Full Version : Disable Text Selection script problem in Firefox



dandyjob
02-01-2007, 06:28 AM
1) Script Title:
Disable Text Selection script

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex9/noselect.htm

3) Describe problem:
I am attempting to disable text selection in MSIE and Mozilla (firefox).
I have tried the script referenced above to no avail...:confused:
I am interested in disallowing both Click Select (mousedown) to select text AND Select All from the top menu and/or right click menu.
I have located a script that will disallow both Click Select (mousedown) AND Select All in MSIE, and disallow Click Select (mousedown) in Firefox, but does allow Select All either from the top menu or right click menu (in Firefox).
Here is the script:

<script language="JavaScript1.2">

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>

I would greatly appreciate if anyone can correct the script to also disallow the Select All feature in Firefox.

jscheuer1
02-01-2007, 07:05 AM
1)I would greatly appreciate if anyone can correct the script to also disallow the Select All feature in Firefox.

Correct it? There's nothing wrong with it. As far as I know it never claimed to prevent the Select All feature in FF, if it did, that was a mistake. Why would you want to prevent people from saving information from your web site anyway? Are you afraid that it is inaccurate?

dandyjob
02-01-2007, 07:51 AM
John,
Thank you very much for your prompt reply!
Apparently my verbiage, i.e correct it has instigated a somewhat of an insulting rhetorical question in your reply for some reason...
I by no means meant there was something "wrong" with the script by inquiring if anyone could "correct" it. I was simply inquiring if anyone could "change" it to accomplish my goal, i.e. keep someone from selecting all the text and pasting it for their own use without permision...
If you can not assist, then may I suggest you keep your personal thoughts to yourself and not be effected by semantics...
If anyone else has something constructive to add to my inquiry, I would greatly appreciate it!
Thank you.

jscheuer1
02-01-2007, 09:25 AM
It wasn't rhetorical or personal. I think the script is worthless but, I am still curious to know, what do you think is so wrong with your site that it cannot stand to have anyone copy information from it? If you don't want something copied, it doesn't belong on the internet or in print. How would you feel if your site was a newspaper, book, or a magazine, how would you prevent copying then?

dandyjob
02-01-2007, 05:47 PM
I thought the forums were for help, not debate...?
If the script is "worthless", then why is it on the site...?
.
I simply would like to know if there is anyway to disable the Select All/Copy function in Firefox.....
Thank you.

jscheuer1
02-01-2007, 06:04 PM
There is quite a bit of debate that goes on here. As for why the script is on the site - I can't really say. I have a number of scripts on the site but none of them are no right click scripts. You would have to ask the site owner/admin for that. I suspect it is because folks who don't know much about publishing often get concerned about people violating their copyright and want these scripts for protection. This gets a lot of people to come to DD when they search for such 'protection' on the web. From the point of view of DD, this is good (people coming to DD). However, these scripts protect nothing and your copyrighted material is already protected by copyright law. Sometimes these scripts interfere with the accessibility of pages or conflict with other scripts.

To answer your question, no. There is no way to disable the user's menu in FF. The fact that this can be done in IE is very odd and owing to IE's proprietary onselectstart event handler.

dandyjob
02-01-2007, 07:44 PM
wow, it took a bunch of rhetoric to get to the answer...
yeah, i'm fully aware of publishing rights and copyright laws, enforcing them is another story, and a rather expensive one at that should push come to shove...
just was looking for something to make plagiarizing a bit more difficult......
kinda figured msie had a bug for it to work since was a no go in mozilla...
thanx for your answer...........
btw, outstanding site, if you have anything to do with it, keep it up......

jscheuer1
02-01-2007, 10:05 PM
yeah, i'm fully aware of publishing rights and copyright laws, enforcing them is another story, and a rather expensive one at that should push come to shove....

But, push usually doesn't come to shove on the web because, if the offending party isn't willing to cease and desist upon a friendly request, their ISP usually is.

I doubt that you have anything worth suing over anyway.

dandyjob
02-02-2007, 12:47 AM
my gosh, are you the last word king or what, enough is enough....!:rolleyes:


I doubt that you have anything worth suing over anyway.

what an asinine statement, how would you know......? :(

may i suggest you stick to scripts............!:confused:

boxxertrumps
02-02-2007, 01:46 AM
In Short, If its on The Web, People Will Access/Save It.

You Cant Prevent this, short of putting a virus on your user's computer that disallows viewing your source/saving your pics.

but thats illegal.

and dont call jscheuer names, its impolite, and He's Smarter than us.

jscheuer1
02-02-2007, 03:30 AM
my gosh, are you the last word king or what, enough is enough....!:rolleyes:

It's easy to hit a stationary target.


what an asinine statement, how would you know......? :(

may i suggest you stick to scripts............!:confused:

A little touchy, aren't we? The fact that I doubt your having anything worth suing over only implies that this isn't likely, not that it is impossible. You obviously chose to react with indignation rather than offer contrary evidence. In fact, all throughout this thread you have avoided answering my direct questions about what you were trying to 'protect'. Had you offered any information in that regard, I might have been able to be of more help to you.

I will own up to being a bit weary of folks trying to 'protect' material that is already protected - if it has any real value. I was a little more harsh on you than was warranted by this one thread. I apologise for that. If you have a real issue having to do with web security, tell us the particulars.


In Short, If its on The Web, People Will Access/Save It.

You Cant Prevent this, short of putting a virus on your user's computer that disallows viewing your source/saving your pics.

but thats illegal.

and dont call jscheuer names, its impolite, and He's Smarter than us.

Thanks for the moral support. Wouldn't a virus prevent the user from viewing the content at all?

I don't know that I am smarter than anyone else in here. That's what I like about this place, I feel as though I am among peers.