473,405 Members | 2,279 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,405 software developers and data experts.

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 24673

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@fake_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.javascript:
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="leftclickfunction(this)"
oncontextmenu="rightclickfunction(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('Your Params')"

Make sure your method returns false or the ie menu will still appear.
"Robert Oschler" <no_replies@fake_email_address.invalid> wrote in message
news:Yu********************@adelphia.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.body.oncontextmenu=null;window.onmouse down=null;window.onmouseup=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('Your Params')"

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

"Robert Oschler" <no_replies@fake_email_address.invalid> wrote in message
news:Yu********************@adelphia.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*****@agricoreunited.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
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...
1
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...
7
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...
2
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...
4
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...
4
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...
0
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...
1
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...
2
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...
0
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: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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...
0
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...
0
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...

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.