Web Hosting Talk







View Full Version : No Right Click question


croakingtoad
03-28-2003, 07:27 AM
I know you can use a 'no-right-click' javascript to protect an entire webpage, but here's an interesting question I'm hoping someone will know the answer to:

Can you have the javascript only apply to a certain section of the page, by say, inclosing it in a <div></div> area?

If so, can you provide a suggested source code (minus the javascript which I have) to implement it?

Thanks!

existenz
03-28-2003, 07:57 AM
You know I never used those scripts because it won't work to prevent MacOS users from getting the image. What I do is place a clear gif over the image so if you save the image, you are saving the clear gif not the picture.

It works the same since if the person is going to look at the source they will get the image one way or another.

Just a thought

digitok
03-28-2003, 08:03 AM
Well if you're wanting to protect a picture (which I don't know if you do) you can always use something like <td background="blah.jpg"></td> because that will put it in the background so right-clicking does nothing, but as existenz said, people can always view source, there's usually a way of getting around anything basically, and I don't really know too much JavaScript, so I wouldn't know if you can protect certain parts of the page from right-clicks.

txclaw
03-28-2003, 10:36 AM
hmmm... about the only chance you have to protect an image is to slice it up so it sets on your web page as small pieces of a bigger picture.......then there is always screen capture... so what the hell......................

Rich2k
03-28-2003, 11:33 AM
Although of course no-right-click doesn't really protect a webpage.

- There is save web page in IE (which will save all images as well)
- There is the image toolbar in IE (which you can disable with a meta tag)
- There is your browser cache
- There is the ability to disable javascript.
- There is VIEW --> SOURCE from the menus

You CANNOT protect HTML content. You can make it hard but you cannot protect it. (We've previously discussed using a javascript function to encrypt the content but then you block out 10-12% of all users... so not an option).