Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: disable a click

  1. #1
    New Coder
    Join Date
    Feb 2006
    Posts
    24
    Thanks
    0
    Thanked 0 Times in 0 Posts

    disable a click

    I want to disable the clicking of a link but enable right click.

    But a Mac is different?


    How to achieve this with Js

  • #2
    Senior Coder
    Join Date
    Feb 2003
    Posts
    1,665
    Thanks
    0
    Thanked 27 Times in 25 Posts
    Code:
    <a href="…" onclick="return false">link</a>
    This should negate the normal click for all js-enabled browsers without effecting the browser's own contextual menu.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •