473,746 Members | 2,700 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Right-click context menu that can pass values when right-clicking a link??

Is it possible?
Say

We have a list of suppliers link like

A supplier
B supplier

when right click on a supplier, a context menu(that has
"details"," view products", etc) appears and click on "view products
for this supplier" this click will redirect users to products page
showing all products from the supplier.

So href should look some like this
<a href="RightClic ked('10')">A supplier</a>

<script>
function RightClicked(su pplierID)
{
// don't know I am making this up here
if (viewDetailsCli cked)
ShowDetails(sup plierID);
else if (viewProducts)
ShowProducts(su pplierID)
etc
..
}
</script>

Can it be done, does anyone have the script?

Thanks a lot
Jul 23 '05 #1
3 1906
Leon wrote:
Is it possible?
Say

We have a list of suppliers link like

A supplier
B supplier

when right click on a supplier, a context menu(that has
"details"," view products", etc) appears and click on "view products
for this supplier" this click will redirect users to products page
showing all products from the supplier.

[...]

Wouldn't normal menus and hrefs to the trick? If not, how about
dynamic HTML (DHTML)? This is what they are intended to be used for.

The ability to modify the right button menu is limited to a couple of
browsers: not everyone has a right button and even if they do, they may
not be able to use it (think of someone who is disabled).

If your application is for a strictly controlled intranet where you can
guarantee a suitable platform, you may be OK. But for the general web,
you may be locking out 20% to 50% of potential visitors.

--
Rob
Jul 23 '05 #2
Leon wrote:
Is it possible?
Say

We have a list of suppliers link like

A supplier
B supplier

when right click on a supplier, a context menu(that has
"details"," view products", etc) appears and click on "view products
for this supplier" this click will redirect users to products page
showing all products from the supplier.

So href should look some like this
<a href="RightClic ked('10')">A supplier</a>


PS. As a hint to how dreadful Microsoft's on-line documentation is,
here is a snippet of their effort to provide a demo of DHTML
menus:

<SCRIPT LANGUAGE="JavaS cript"><!--

/* ----------------------------------------------------------------
sniffing code to detect for IE4 on either Windows NT or 95
---------------------------------------------------------------- */

var sAgent = navigator.userA gent
var bIs95NT
= sAgent.indexOf( "Windows 95") > -1
|| sAgent.indexOf( "Windows NT") > -1
|| sAgent.indexOf( "Win32") > -1
|| sAgent.indexOf( "Windows 98") > -1
var bIsIE4
= sAgent.indexOf( "IE 4") > -1
&& sAgent.indexOf( "b1") <= -1
&& sAgent.indexOf( "p1") <= -1
var bIsIE432 = bIs95NT && bIsIE4

/* ----------------------------------------------------------------
variable declarations for doMenu
sOpenMenuID points to any open pop-up menus, is blank otherwise
---------------------------------------------------------------- */
<URL:http://msdn.microsoft. com/library/default.asp?url =/library/en-us/dndhtml/html/popupmenu.asp>

You may note that their own demo code excludes 95% of current web
surfers! That is, anyone not using Win32/95/NT with IE 4.

Good for a giggle but that's about it.

--
Rob
Jul 23 '05 #3
Thanks for your reply.
Yes, this is for intranet.
Do you have any script for that?
I am not very familier with DHTML.

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #4

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

Similar topics

4
1452
by: Frederik | last post by:
Hi all, I'm trying to extend the context menu that appears when right clicking a folder in Windows Explorer. I've seen some examples in C++ (not .NET). Since C++ is not (yet) my cup of tea, I would like to know how that context menu can be extended using VB.NET or C# (preferably). Which library in the .NET Framework is capable of doing this? What I want to do is pretty straight forward: the path of the folder should be passed to my...
3
1992
by: Marcel Hug | last post by:
Hello NG ! I would like to show the context menu which apears when i drop a file by fight mouse button. Could somebody help me ? Thanks
3
2254
by: - Steve - | last post by:
I have a website where I use forms based authentication. There's a couple links in there that go to another website that uses basic authentication. How can I pass the credentials of the logged in user on the first site when they click the link to access the second site? -- Steve Evans Email Services
10
4141
by: Sender | last post by:
I wrote about this yesterday...and many people advised the solution. But it didn't work. Let me put it again: I have a form with just command button. Then I inserted a context menu (contextmenu1). Now when I want to run the form I want to display this context menu when someone LEFT click (not right click) this command button. Many people told me to use contextmenu1.show method. In the click event of the button1 I entered the following...
3
1198
by: Just Me | last post by:
I have a usercontrol on which I have, say, five controls. I want a context menu to popup when the mouse is clicked anywhere on the userconttrol. The same context menu. What I've done in the past is to put code in each control's mouseup event. Is that the way to go or is there a better way?
3
5253
by: hzgt9b | last post by:
Using VS2005, VB.NET, I am developing a windows app that has a DataGridView. I want to enable the display of a context menu on this DataGridView only when a specific set of keys is also pressed (like CTRL+ALT+SHIFT). TO this point I have code that only displays the context menu while keys CTRL +ALT+SHIFT are pressed - but after the keys are released the context menu still gets displayed. Can someone tell me where the following code is...
19
3305
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 && evt.target) { srcElement = evt.target;
1
1543
by: sss123456 | last post by:
Hi, i have a iframe and calling a php inside that, and the is a conext menu by which i'm perfoming task to set colour of selected text on diif conditions. this is working fine in IE, but in mozilla u have to set desingmode "on" of iframe to set the color of selected text , so when i do this context menu not apper inside iframe. Any help Thanks
1
2931
by: Adam Clauss | last post by:
I have a ListView (in 'details' view) to which I added a ContextMenuStrip (using the designer). This is all good, except that the context menu also appears when I right click a column header - I just want it to be a couple of selections available when right clicking on various items in the list. Is there a way to restrict where the context menu can activate from? -- Adam Clauss
0
9350
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9218
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
8229
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
6772
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
6060
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4836
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3292
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
3
2199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.