SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Guru augathra's Avatar
    Join Date
    Jul 2004
    Location
    united states
    Posts
    826
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Detecting right click

    Hi, might someone write an example of the easiest way to detect a right click, and if there is one, document.write("Right Click Detected");?

    Also, once they left click, is it possible to take the words away?
    (I dont want an alert, lol)

    Thanks

  2. #2
    SitePoint Wizard gRoberts's Avatar
    Join Date
    Oct 2004
    Location
    Birtley, UK
    Posts
    2,439
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you want, you can do onContextMenu="alert('Right click detected'); add this to body, or link etc. should work fine.

    Gav


Bookmarks

Posting Permissions

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