Current location: Hot Scripts Forums » General Web Coding » JavaScript » Right Click Menu


Right Click Menu

Reply
  #1 (permalink)  
Old 10-11-04, 11:17 AM
dwoody dwoody is offline
Newbie Coder
 
Join Date: Jul 2004
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Right Click Menu

I am planning on making a menu on my website that is visible when a user right clicks his/her mouse (similar to a standard windows menu). I basically have just put a table inside a div and used the onMousedown and event.button commands to launch the menu. However using this method also shows the standard windows menu as well as my custom menu upon right clicking. Is there a way to make sure the windows menu does not launch but mine does when a user right clicks?

Also I was thinking of having one of the options on the menu be a disable option so the user could turn of the custom menu if he/she does not want it the next time they right click. How would I go about doing this?

Thanx
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 10-15-04, 10:11 AM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
run this once in your code (not each time a user right-clicks, that is uneccessary)

document.oncontextmenu = new Function("return false")
you could also try returning false from your onmousedown handler since the above will proabbly only work in IE
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a drop down menu ? ? ? Spreegem PHP 4 03-09-05 10:34 AM
Drop down menu trouble NCC1701 PHP 10 11-12-04 05:09 AM
Simple tree menu w/ html and js? zcorpan JavaScript 2 06-18-04 07:17 PM
edite right click menu leave >save as< masterblasters HTML/XHTML/XML 0 01-02-04 01:45 PM
putting content in a drop down menu tom PHP 7 07-04-03 03:25 PM


All times are GMT -5. The time now is 12:49 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.