Forum Moderators: open
Well, due to a feature on my website, the user would find this very frustrating on certain images, because they will be using an image to see what they are doing...
so is there anyway to stop it?
Thx!
Surround this in JS tags in the HEAD. It will stop Cut, Copy and Highlight. This may be what you're looking for.
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
}
I think the idea was to post enough info to point people in the right direction so they could then solve the problem themselves, and therefore learn about the underlying concepts.
Posting straight code that people can copy'n'paste won't help them learn why the code does what it does.
Using stickymail with no hints made public won't help other WW users learn. WW is (among other things) a reference tool for everyone, and so we should try to post useful information.
So perhaps a suitable answer could have dropped a hint about using "onselectstart" for IE, and "onmousedown"/"onclick" for N6. Then people could work out the rest themselves.
And if I have misunderstood this, someone please set me straight. ;)