473,770 Members | 4,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Replace Contextmenu with new menu

Hi all,

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html

It works nice in MSIE, but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is). And the links
do not work when you click on them.

If anyone has sugestions on how to improve it, please let me know.

Thanks,
Wouter
Jul 20 '05
52 4750
DJ WIce <co*********@dj wice.com> wrote:
I'll try to make it smaller than the original one (no disabled
options that do show) and add icons.
Just an other thing one can design together with the style of their
site. Like most new things it's hard for the first to change :-)


First of all, you're not changing it, you're replacing it, and doing a poor
job. Second, if the context menu was meant to accept style suggestions,
there would be a way to do so with simple CSS. Third, you don't know what's
on the user's context menu (it's not the same for all operating systems and
browsers) and you can't replicate the features they're expecting.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #21
: >> My menu was made to look good with my browser, not with your site.
: > Yeah, and what you are viewing is my site ;-)
:
: I came to your site for its content. Your job as an author is to provide
: that content in an organized fashion with proper structure, both in your
: code and in site navigation.
Yes, and here is a definition part that's your discussion point:

site navigation.

I think that includes all the things you can do with my website.
Your opinion is that your browser interface is perfect.
I'm not always convinced all people would think that after they seen some
new.

Internet was never intended to have banners and commercial advertisements.
But it's the one reason why it still exists in this lange scale; they pay
the high way.
(Even though I don't like them on websites or worse in e-mail).
: It is *not* your job to alter my browser preferences or
: interfere in anyway with the normal operation of my browser.
I know, and I will never do that. If you have a browser that does allow
interfearance.. why do you use it?
You just talked about your browser being exactly like you want it?
Ciao and don't be to angry, don't try to find the sence of it. I'm just
finding the limit of the technological posibilities. Nothing more, nothing
less.
Wouter
Jul 20 '05 #22
DJ WIce wrote:

<--snip-->

Do you know MSIE accepts that if you press key x that if tell MSIE that it
was a Q it beleves me?
Code:

document.onkeyd own = function(e)
{
if (document.all)

<--snip-->

Just a side note, and an FYI one. MSIE is not the only browser that can
pass that test. Opera, in IE spoof mode, and several other browsers
emulate the document.all (pass the test).
if (document.all &! document.layers &! window.opera){
alert('I think you are using MSIE but I could still be wrong')
}

the !window.opera excludes Opera.
the !document.layer s excludes a browser (the name eludes me, Jim Ley
named it once for me) that supports both document.all and document.layers .

--
Randy

Jul 20 '05 #23
DJ WIce <co*********@dj wice.com> wrote:
I think that includes all the things you can do with my website.
Your opinion is that your browser interface is perfect.
I'm not always convinced all people would think that after they seen
some new.
And once they leave your site, will they ever see your navigation again?
Does it even matter if they like it if they can never use it?
It is *not* your job to alter my browser preferences or
interfere in anyway with the normal operation of my browser.

I know, and I will never do that.


When I right-clicked on your page and saw a menu other than my browser's and
without the features I wanted, then you interfered with my browser.
If you have a browser that does
allow interfearance.. why do you use it?
If, in this case, intereference means JavaScript, than no, I don't allow it.
I turn it off unless I'm testing a page like yours or some site was poorly
designed to require it.

JavaScript, while not necessarily a bad idea, was horribly abused by the
"developers " at Microsoft and by authors who think they should (or even can)
have ultimate control over another's browser.
You just talked about your browser being exactly like you want it?


Yep, that's what Edit > Preferences is for.
--
Michael Wilcox
mjwilco at yahoo dot com
Essential Tools for the Web Developer - http://mikewilcox.t35.com
Jul 20 '05 #24
DJ WIce wrote:
: First of all, you're not changing it, you're replacing it, and doing a
: poor job.
That's just a mater of opinion. If I wanted that your opinion on me
replacing the menu, I would have gone to alt.html.critiq ue.
Here's a heads-up for ya - you'll most likely get roasted in
alt.html.critiq ue for trying to mess with the user's browser. ;)
: you can't replicate the features they're expecting.
Maybe I can make features that they do not have in that menu?
A user is accustomed to having their context menus work the same
regardless of what web site they are on. You are trying to make it
different. This does not help the user at all, but will only confuse or
annoy them.
Maybe this is just a test case for me, testing what is possible?
Just because you can, doesn't mean you should. If you care about your
users, you won't mess around with their UI.
Do you know MSIE accepts that if you press key x that if tell MSIE that it
was a Q it beleves me?


And what if the visitor isn't using IE?

--
To email a reply, remove (dash)un(dash). Mail sent to the un
address is considered spam and automatically deleted.
Jul 20 '05 #25
DJ WIce wrote:

I did make a script/css thing to replace the contextmenu on the website with
a new one: http://www.djwice.com/contextmenu.html
One which fails to work as advertised in Mozilla. "Add to favorites"
does exactly nothing. And how could it, since "favorites" is
Microsoft-specific. So what good is the script?
It works nice in MSIE
....for which it was obviously designed...
but on Netscape (and probable other browsers) it
stays on the same place (does not "open'' where the mouse is).
I'm not sure what you mean. Using Mozilla 1.3/Win2k, the context menu
pops up where the normal one would, and looks all pretty and everything.
And the links do not work when you click on them.
back, forward, refresh, view source, and use standard menu all work in
Mozilla. I didn't try print, so I cannot say what happens with that
one. Add to favorites does not work (as I said above). Neither does
"make home page."

Trying to make HTML a programming interface (target="_new" anyone?) is
fraught with problems. Using javascript as an end run to hijack the
browser is only going to introduce the same issues.
If anyone has sugestions on how to improve it, please let me know.


For Mozilla? You cannot make it fully functional, that's for sure.

The menu looks quite nice, and may have some very elegant code behind
it. But I'm afraid there's no way to improve it for my preferred
browser. And even in MSIE, it's terrible in terms of usability for the
context menu to change from site to site, just like it's terrible for
the fixed menus to change. The best thing you could do for the web is
drop the idea.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #26
"Randy Webb" <hi************ @aol.com> wrote in message
news:K-*************** *****@comcast.c om...
<snip>
Do you know MSIE accepts that if you press key x that if tell
MSIE that it was a Q it beleves me?
Code:

document.onkeyd own = function(e)
{
if (document.all)<--snip-->
Just a side note, and an FYI one. MSIE is not the only browser
that can pass that test. ...

<snip>if (document.all &! document.layers &! window.opera){
alert('I think you are using MSIE but I could still be wrong')
Konqueror 3 (Safari), IceBrowser 5, iCab and NetFront (at least) all
also make it in here. I think that they all support a - keyCode -
property on a global - event - object but I doubt that they will behave
consistently in response to having that - keyCode - property
re-assigned.
}
There are objects for which their existence would currently allow the
inference that the browser in use was IE (5.0+). But given the extent to
which, for example, IceBrowser actively spoofs the IE DOM (global
ActiveXObject constructor, filters collections on elements, etc.) it is
unlikely that any test that attempts to infer the browser make or
version from the existence of objects in its DOM is going to stay valid
for long. Even IE's conditional comments could be implemented by another
browser if they were seen to be being employed as a mechanism to exclude
it from a significant number of sites.

In principal[1] the safe test for the availability of the required
feature would be:-

if((typeof event != 'undefined')&&
(typeof event.keyCode == 'number')){
... // safe to access event.keyCode
}

- but the only way of seeing if assigning a new value to - keyCode - had
the desired result would be to try it and then monitor the browser to
see if it was possible to work out what the result was.
the !window.opera excludes Opera.
the !document.layer s excludes a browser (the name eludes me,
Jim Ley named it once for me) that supports both document.all
and document.layers .


It was Omniweb.

Richard.

[1] The principal being: testing the browser for the existence of the
features most closely associated with the code that may be executed if
they exist.
Jul 20 '05 #27
"DJ WIce" <co*********@dj wice.com> wrote in message
news:bu******** **@news.tudelft .nl...
: First of all, you're not changing it, you're replacing it,
: and doing a poor job. That's just a mater of opinion.
You are (at least attempting to) replace the context menu, so that
cannot be opinion.

You are doing a poor job, because you are failing to replace it at all
on Opera versions (for example). Your replacement can only be an
impoverished version of the original at best because you have no way of
telling what features were in the original and are incapable of
reproducing (at all, or fully) many of the features that you know would
have existed on the context menus of common browsers.
If I wanted that your opinion on me replacing the
menu, I would have gone to alt.html.critiq ue.
If it is scripted and you post it to comp.lang.javas cript you are
inviting opinions on how viable/sensible the script is.

<snip>Maybe I can make features that they do not have in that menu?
When a user activates the context menu of their browser it is not a
speculative activity intended to give them the opportunity to see what
new features may have been provided. It is an action taken with the
expectation that a known set of features will be available to them. If
you take any of those features away, or break them with a bad
implementations (and especially the one they intended to use), it
doesn't matter how spectacular what you put in its place may be, the
user will still be frustrated.
Maybe this is just a test case for me, testing what is possible?

<snip>

Then you should want to be told if you are wasting your efforts on
something with no viable Internet applications.

Richard.
Jul 20 '05 #28
On Thu, 15 Jan 2004 22:56:32 +0000, Steve Pugh <st***@pugh.net > wrote:
It doesn't work at all in Opera 7.23 (even when I set my preference to
allow JavaScript to access the right mouse click, which I normally
don't allow. Can any Opera users remember whether that's off or on by
default?)


I've never changed that setting as far as I can rememember; it's off in
my 7.23.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #29
: One which fails to work as advertised in Mozilla. "Add to favorites"
: does exactly nothing.
Thanks I did disable it (I think) in Mozilla.

Wouter
Jul 20 '05 #30

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

Similar topics

46
7043
by: DJ WIce | last post by:
Hi all, I did make a script/css thing to replace the contextmenu on the website with a new one: http://www.djwice.com/contextmenu.html It works nice in MSIE, but on Netscape (and probable other browsers) it stays on the same place (does not "open'' where the mouse is). And the links do not work when you click on them. If anyone has sugestions on how to improve it, please let me know.
1
2040
by: Brian Martel | last post by:
I am trying to create a dynamic flyout submenu off of a contextmenu. I can right click and get the base contextmenu ok. On the Popup event I add MenuItem's to the collection of one of the items so it has a flyout submenu when selected. If I try and add more than 1 item to the submenu it only shows up the first time. This same code works fine if it is part of a MainMenu but not with a ContextMenu. Has anyone seen this before? Have you...
2
2926
by: Derrick | last post by:
I've been working on an application which has a NotifyIcon (system tray icon), and a corresponding ContextMenu. I want to be able to update this menu dynamically. However, when I make changes to the menu, it seems to disappear. This only breaks when the context menu is tied to a NotifyIcon - not to any other control. Below is a C# file for a form which should illustrate this (at least it does on my machine!). The same contextmenu is...
10
21325
by: tmaster | last post by:
When I try to dynamically add a second sub menu item to this ContextMenu item, I get an error 'Specified argument was out of the range of valid values'. Private Sub mnuTopics_Show_Select(ByVal sender As System.Object, _ ByVal e As System.EventArgs) _ Handles mnuTopics_Show.Select Dim mShowMenuItem As MenuItem mShowMenuItem = DirectCast(sender, MenuItem)
7
1396
by: TryingLikeHeck | last post by:
I have a usercontrol on which I've generated a context menu in designer. The properties of the control lists for ContextMenu (none) The menu shows up in the designer window and I can edit it To assign my menu to the property in New I do ContextMenu = RePopupMenu To show it, on right mouse down I do ContextMenu.Show(Me, New Drawing.Point(e.X, e.Y))
3
347
by: asharda | last post by:
Hi, I am trying to create a context menu in my application. The context menu takes menu otems from an XML file. In XAML the code is <Grid.ContextMenu> <ContextMenu Name="cm" StaysOpen="true" Width="Auto" Height="Auto" ItemsSource="{Binding Mode=OneWay, Source={StaticResource ListItemsDS}, XPath=/ListboxItems/ListboxItem/ ScreenName}" MenuItem.Click="add_Click">
0
9602
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9439
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10237
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9882
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8905
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7431
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5326
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3987
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3589
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.