473,795 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Capture right-click event?

Hello,

In my web pages I attach the OnClick event. However this doesn't seem to
intercept right-click events. Is there another event I need to attach or is
it something else?

thx

--
Robert Oschler
http://www.dog-images.com -- Devoted to providing free info on the health,
nutrition, and training of dogs.

Jul 20 '05 #1
5 24687

I know how to do it .. but I don't agree with the practice or ability
of it.
sorry,

Brynn
On Sat, 24 Jan 2004 00:57:34 -0500, "Robert Oschler"
<no_replies@fak e_email_address .invalid> wrote:
Hello,

In my web pages I attach the OnClick event. However this doesn't seem to
intercept right-click events. Is there another event I need to attach or is
it something else?

thx

--
Robert Oschler
http://www.dog-images.com -- Devoted to providing free info on the health,
nutrition, and training of dogs.


Brynn
www.coolpier.com

I participate in the group to help give examples of code.
I do not guarantee the effects of any code posted.
Test all code before use!
Jul 20 '05 #2
Brynn wrote on 24 jan 2004 in comp.lang.javas cript:
I know how to do it .. but I don't agree with the practice or ability
of it.
sorry,
While not all functions are advisable for a public page,
special rightclicking can be very useful.

I have a personal page for housekeeping a database.
This page is IP specific and password protected.
Leftclicking on a record makes that record accessable for maintenance.
Rightclicking is for deleting the record after confirm().

[The easy thing for a personal page is that you write only for your own
browser, IE6 in my case]

<div class=myrecord
onclick="leftcl ickfunction(thi s)"
oncontextmenu=" rightclickfunct ion(this)" ....


--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 20 '05 #3


Robert Oschler wrote:
In my web pages I attach the OnClick event. However this doesn't seem to
intercept right-click events. Is there another event I need to attach or is
it something else?


You can use the onmousedown event handler and check which mouse button
has been pressed, however most people asking for right click are looking
to intercept the context menu being requested, IE5+ and Netscape 6/7
allow that with the
oncontextmenu
handler
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #4
The event you are looking for is onContextMenu.

Ex
onContextMenu=" return YourMethod('You r Params')"

Make sure your method returns false or the ie menu will still appear.
"Robert Oschler" <no_replies@fak e_email_address .invalid> wrote in message
news:Yu******** ************@ad elphia.com...
Hello,

In my web pages I attach the OnClick event. However this doesn't seem to
intercept right-click events. Is there another event I need to attach or is it something else?

thx

--
Robert Oschler
http://www.dog-images.com -- Devoted to providing free info on the health,
nutrition, and training of dogs.

Jul 20 '05 #5
That code makes me glad I have a scriptlet on my Links toolbar that does:

javascript:void (function
(){document.bod y.oncontextmenu =null;window.on mousedown=null; window.onmouseu p=null;}());

So when I do find myself surfing the Web with IE (because of the horrible design
of some sites which make it almost impossible to view the site with anything
other then IE), I can disable the author's misguided attempts to "help me out"
by messing with the functionality of my browser.

Jason Daviau wrote:
The event you are looking for is onContextMenu.

Ex
onContextMenu=" return YourMethod('You r Params')"

Make sure your method returns false or the ie menu will still appear.

"Robert Oschler" <no_replies@fak e_email_address .invalid> wrote in message
news:Yu******** ************@ad elphia.com...
Hello,

In my web pages I attach the OnClick event. However this doesn't seem to
intercept right-click events. Is there another event I need to attach or

is
it something else?

thx

--
Robert Oschler
http://www.dog-images.com -- Devoted to providing free info on the health,
nutrition, and training of dogs.


--
| Grant Wagner <gw*****@agrico reunited.com>

* Client-side Javascript and Netscape 4 DOM Reference available at:
*
http://devedge.netscape.com/library/...ce/frames.html

* Internet Explorer DOM Reference available at:
*
http://msdn.microsoft.com/workshop/a...ence_entry.asp

* Netscape 6/7 DOM Reference available at:
* http://www.mozilla.org/docs/dom/domref/
* Tips for upgrading JavaScript for Netscape 7 / Mozilla
* http://www.mozilla.org/docs/web-deve...upgrade_2.html
Jul 20 '05 #6

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

Similar topics

6
18604
by: Ravi | last post by:
Hi, Im trying to develop a Visual C# .NET app. that uses DirectShow filters to capture video from camera source. However, after going through a series of articles, I've seen that DirectShow is not directly supported in Visual C#.NET. Im wondering if there's any way to use the video-capture filters of DirectShow in Visual C#. Otherwise, would it be possible to create a Visual C++ DLL that uses DirectShow filters to capture video from a WDM...
1
2962
by: xc | last post by:
Greetings. I encountered a wield problem when grabing screen images. Sometimes in some computers I can capture the screen, but other times not so. In some computer I cannot capture the screen image, but when I change its color bits, say from 32bits to 24 or 16bits, the program can capture the image. Can anyone kindly examine my following code, and point out the flaw:
7
62048
by: Bob Achgill | last post by:
When I use the code for KeyPress to capture pressing a certain key for processing on a form with no Text Box it works. But when I try the same code on my application that has text boxes it does does not work. How can I capture the cursor left and right keys for processing?
2
2220
by: Eddie Dunn | last post by:
I have one here that I cannot find anything on in my searching. I am implementing a screen capture functionality into my Visual Basic ..NET application. The code I am using calls the bitblt function in gdi32.dll to achieve its magic as follows: Public Function CreateScreenshot() As Bitmap
4
5374
by: gwhite1 | last post by:
I use this code to capture a screen in a regular VB 2005 windows app. It works great! I found the code in google. But when I create a windows service it does not capture the screen. It only captures a blank graphic. Does anyone know why it will not capture the current screen? Is something not available when running as a service? Thanks!!! Sheila Function CreateScreenshot() As System.Drawing.Bitmap Dim Rect As System.Drawing.Rectangle =...
4
1462
by: sck10 | last post by:
Hello, I want to allow all users on our company intranet (domain\handle) to enter our website. However, I would like to capture the handle of the person entering my website. I was told that if I turn on Enable Anonymous Access and Integrated Windows Authentication, that all users will pass through, and there is a way to capture their handle. Is this possible? Right now I have Integrated Windows Authentication turned on and using the...
0
1192
by: amyl | last post by:
I have a 32 bit number "3515261219" that really contains four 8 bit numbers. 11010001 10000110 10100001 00100011 Is there a way to capture the bits that are shifted out of the number when you right shift? If I can grab the bits this way I can right shift 8 bits and capture each number. The other way I possibly see doing this is to right shift 24 which will
1
4508
by: JP2006 | last post by:
I'm trying to write a control that will take a screen capture of a particular website when a user submits a form in a web application; one of the form fields is for a URL - the control needs to get an image of that web site so that it can be displayed later as a thumbnail image. I have code for taking a normal screen capture using GDI+ which works fine. What I am now trying to do is to modify it so the screen capture is of a remote...
2
2097
by: Kev | last post by:
Hello world, I am trying to capture the latest entry into a text box by the user and then insert it in a separate text box. I must not be searching the right key words because I can only find oldvalue and value (which is the old value plus the inserted or changed value) It is the inserted or changed value that I want. I have tried Dim strControlName As String, strContValue As String, strContOldValue As String
0
1336
by: Jomotix | last post by:
Hey! I'm new to python and I am trying to capture Radiotap Headers and to parse them to get the mac timestamp out. So I found this for parsing radiotap headers: http://www.wand.net.nz/~smr26/python/radiotap/radiotap.py but before i can use that i need to capture the whole header in a string, and THATS my question right now: "How can I capture a radiotype header to a string?" I already set up a ath0 device on monitore mode and with...
0
9522
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
10448
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
10217
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...
0
10003
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...
1
7544
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
6784
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
5440
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...
0
5566
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2922
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.