Forum Moderators: open

Message Too Old, No Replies

Disable right click on a hyperlink?

Just disable right clicking for a single link...

         

JAB Creations

12:17 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not sure how to do this ... I know it's an onmousedown event but not sure how to associate that with the right mouse button.

<a href="#" onmousedown="? ">No right click</a>

SpaceFrog

7:37 am on Feb 22, 2005 (gmt 0)

10+ Year Member



oncontextmenu="return false;"

incrediBILL

8:23 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Why would you want to do that?

People like to do what they do, and if you try to alter those habits you will alienate some level of visitors. I often open links in new tabs on FireFox so I don't lose my place in the other page. I also tend to close sites that dictate how I use my browser, hint hint.

JAB Creations

9:27 am on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One, this script is for someone I'm helping out ...

Two, I'm a firm believer of SAVING files one will reuse. I think this would be rather nifty conciding I would prefer not to have bandwidth burned by peopole who keep coming to the site to download the same files. I had one guy burn over 1 GB of bandwidth a year ago because he kept watching the same video over and over but something kept clearing his cache. I forgot which apche code (304?) it was but the point is that a GOOD designer won't force you to do something lame ... like tell you that you have to turn off Adblock or other adblocking software or you can't see their site.

incrediBILL

4:27 pm on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Jab, I would've guessed that repetitive downlaods were caused by someone either attempting and failing to actually save the file which would've saved you in the long run had it worked - or had that Internet Explorer problem where when the temporary internet files overflow the cache goes nuts, which this wouldn't change anyway.

JAB Creations

5:34 pm on Feb 22, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Actually I made a mis-post. My intent was to disable the left click however I did achieve this.