473,326 Members | 2,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

How can I invoke the context menu from javascript?

Can I invoke the context menu from javascript so I can have it
disabled on 1 right-click, but show it on a double right-click or
vice-versa?
Jul 23 '05 #1
6 2516
In article <a9**************************@posting.google.com >,
mi***********@mail.com enlightened us with...
Can I invoke the context menu from javascript so I can have it
disabled on 1 right-click, but show it on a double right-click or
vice-versa?


There is a way to disable it on right click, but it isn't recommended
for an internet application because people with disabilities need it to
navigate and because it irritates people. Plus, there is a very easy way
to get around such things. Also, people are used to interfaces. They
don't like being confused when you change them. Changing familiar
interfaces loses visitors.

Okay, all that said...

I'm pretty sure double-click events are not cross-browser. Is this an IE
application?

There is plenty of stuff on using and customizing the context menu.
GIS: http://www.google.com/search?
q=contextmenu+javascript&btnG=Search&hl=en&lr=&ie= UTF-8

As a Netscape 7 user, I can tell you that our intranet application that
is supposed to customize the context menu, doesn't for me. So, if your
users have browsers other than IE, do remember to test in them. ;)

--
--
~kaeli~
Practice safe eating - always use condiments.
http://www.ipwebdesign.net/wildAtHeart
http://www.ipwebdesign.net/kaelisSpace

Jul 23 '05 #2
Michel wrote:
Can I invoke the context menu from javascript so I can have it
disabled on 1 right-click, but show it on a double right-click or
vice-versa?


Unless you provide reasons I find valid I will not even try to suggest
how that could *possibly* be done in *some* user agents because not
supporting this course of action and eventually hiding the required
information from anyone who does not know it and reads this posting
hopefully makes the Web a better place to be.

So my answer is only that:

1. Double-clicking is a Bad Thing from an ergonomic perspective
as it is likely to support RSI (Repetitive Strain Injury).
It seems foolish to force users to right-double-click for a
normal function of their software that they are used to work
with one click (possibly on another mouse button, for example
the left one in Opera).

2. There are more way to access a context-sensitive menu than
clicking a mouse button, depending on the user agent and
the GUI/application framework. Your method is flawed if it
does not also cover these access points, and what they are
you cannot know.

3. Do not ever mess with the software of your users (unless you
are really really sure that you know what you are doing).
PointedEars
Jul 23 '05 #3
> > Can I invoke the context menu from javascript so I can have it
disabled on 1 right-click, but show it on a double right-click or
vice-versa?


Unless you provide reasons I find valid I will not even try to suggest
how that could *possibly* be done in *some* user agents because not
supporting this course of action and eventually hiding the required
information from anyone who does not know it and reads this posting
hopefully makes the Web a better place to be.


I just want to add special settings onder the right-button without
completly disable the normal right-button context-menu.
I skipped the idea of doublecliking but want my ownmenu show up as
long as the right-click doens't release. So when a user rightclicks
and hold the button down it shows a special menu and maybe even all
the shortcut's and site-navigations. As soon as the right mousebutton
is released and if the mouse hasn't moved down the special menu, the
normal contextmenu should show up.
Jul 23 '05 #4
Please include a short attribution line like the following next time.
It makes discussions easier to follow.

Michel wrote:
Can I invoke the context menu from javascript so I can have it
disabled on 1 right-click, but show it on a double right-click or
vice-versa?


Unless you provide reasons I find valid I will not even try to suggest
how that could *possibly* be done in *some* user agents because not
supporting this course of action and eventually hiding the required
information from anyone who does not know it and reads this posting
hopefully makes the Web a better place to be.


I just want to add special settings onder the right-button without
completly disable the normal right-button context-menu. [...] So
when a user rightclicks and hold the button down it shows a special
menu and maybe even all the shortcut's and site-navigations. As soon
as the right mousebutton is released and if the mouse hasn't moved
down the special menu, the normal contextmenu should show up.


Ahhh, that reads much different. Well, if you want to *extend* the
context menu it will do no harm and as such it can be quite easily
accomplished, but only in some browsers. I have not much time right
now to explain how, but IIRC I have posted URIs to solutions for
Mozilla/5.0 and IE 5+ here before. Google (Groups) is your friend.
[psf 6.1]
HTH

PointedEars
Jul 23 '05 #5
> >>> Can I invoke the context menu from javascript so I can have it
disabled on 1 right-click, but show it on a double right-click or
vice-versa?

Unless you provide reasons I find valid I will not even try to suggest
how that could *possibly* be done in *some* user agents because not
supporting this course of action and eventually hiding the required
information from anyone who does not know it and reads this posting
hopefully makes the Web a better place to be.


I just want to add special settings onder the right-button without
completly disable the normal right-button context-menu. [...] So
when a user rightclicks and hold the button down it shows a special
menu and maybe even all the shortcut's and site-navigations. As soon
as the right mousebutton is released and if the mouse hasn't moved
down the special menu, the normal contextmenu should show up.


Ahhh, that reads much different. Well, if you want to *extend* the
context menu it will do no harm and as such it can be quite easily
accomplished, but only in some browsers. I have not much time right
now to explain how, but IIRC I have posted URIs to solutions for
Mozilla/5.0 and IE 5+ here before. Google (Groups) is your friend.
PointedEars


I don't know what you mean with IIRC or URIs? But I did look around on
google and I still didn't find a way to trigger the pop-up of the
context-menu from javas script :(
Jul 23 '05 #6
Michel wrote:
[...] Well, if you want to *extend* the context menu it will do no
harm and as such it can be quite easily accomplished, but only in some
browsers. I have not much time right now to explain how, but IIRC I
have posted URIs to solutions for Mozilla/5.0 and IE 5+ here before.
Google (Groups) is your friend. [...]
I don't know what you mean with IIRC or URIs?


I don't know if you don't know, so don't ask me ;-)

IIRC: If I Recall/Remember Correctly. Common Usenet jargon.
See <http://www.catb.org/~esr/jargon/> et al.

URI: Uniform Resource Identifier. Informal: Internet address.
See `URL'.

You should bookmark <http://en.wikipedia.org/>.
But I did look around on google and I still didn't find a way
to trigger the pop-up of the context-menu from javas script :(


The language is called JavaScript and has nothing to do with Java.

I confused this group with de.comp.lang.javascript where I posted
the URIs and the keywords used to find them:

<news:40**************@PointedEars.de>

Found out some time before, sorry for the delay, I just forgot it.
HTH

PointedEars
Jul 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michel | last post by:
I like to show a inbetween selfmade menu when rightclicking the page. So on the first line I want to add "Default right-click menu". So first I need to capture it, then I need to stop the...
8
by: Dennis C. Drumm | last post by:
Is there a way to modify the standard context menu shown when someone right clicks in a windows text box and that would work for all open windows applications? The standard context menu for...
1
by: Craig | last post by:
what are the advantages/disadvantages of using a .net context menu vs using the javascript one that I can create in Macromedia Fireworks? I'm not familiar with the .net context menu.
0
by: Lesley | last post by:
How can I invoke the standard Windows Shell Context menu for a file or folder from vb.net? I have a treeview with nodes in it representing files and folders, as in windows explorer and when I...
3
by: brisco5 | last post by:
I have a TEXTAREA element. A user right clicks within in to get the context menu and they select "paste". I want my javascript code to know that they selected "paste". I know you can capture the...
2
by: Robbo | last post by:
Hi, I am creating html pages with forms where I use Dynarch menu script in a context menu mode. Their script needs to be initialized like this: <body onload="DynarchMenu.setup('menu', { context:...
19
by: BibhuAshish | last post by:
Hello, I have created a context menu in mozilla by using following code: function nrc(e) { var contextMenu; document.oncontextmenu = function (evt) { var srcElement; if (evt &&...
1
by: chandan | last post by:
Hi, I am in search of a control that can save image form my webpage. On that web page I am using my own context menu and I disabled the default context menu of IE. Now I want the same...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.