473,698 Members | 2,467 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

onclick doesn't fire when CTL-key is pressed

6 New Member
I am using a simple ajax routine to notify a server of click thrus. This routine passes information about each link on a page when it is clicked to the server which logs information about the click thru. The code works fine unless the CTL key is pressed as someone might do in order to open the link in a new window/tab. Firerfox handles this situation fine. But IE does NOT fire the onclick() routine in this instance.

This appears to be a problem inherent in every version of IE I have tested so far. It may also be an issue with other browsers.

The code for the construction of each click thru/link is comprehensive, passing a good deal of data to the server (account #, target url, anchortext, source page, etc.). Is there a simple way to force IE to fire the onclick event when the CTL key is pressed?

I know I could give every link a unique id but tracking the data on every page to each link dynamically sounds troublesome to say the least.
Sep 11 '13 #1
1 1367
Steviebone
6 New Member
The answer is to use mousedown for this instead of onclick. This works for my purposes and is apparently how Google and Bing handle click tracking as well.
Sep 12 '13 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
2451
by: Sean | last post by:
I am frustrated by the issue, and looking for a workaround. I have a dropdown list, and a button and some other controls on the page. When the button is clicked, I need to ensure a valid dropdown list item is selected, (e.g. selectedIndex > 0, as the 1st item in ddl is dummy record). Also, I need use some NET build-in validators for other controls. What I did is: - Create a JS function
14
23248
by: xxbmichae1 | last post by:
I have a <select> object that i've set up an onchange event that fires in IE fine when I use the cursor up and down in the list, but If I use the cursor up and down in Firefox the event doesn't seem to fire until I've left the field....If i use the mouse all is fine, only when using the cursor keys does it not fire the onchange event in FF. Thanks for any help in advance.
1
1268
by: Brent Burkart | last post by:
Can anyone shed light on this situation. I have dropdownlists that won't fire when I select an item when there is a webcontrol on the page. When I remove all the webcontrols, the dropdownlist works just fine. This is a big pain and I am hoping someone could help me out. Thanks, Brent
4
10118
by: Keith-Earl | last post by:
I thought for sure Session End would fire when the user closes his browser, but no luck. The only way I can get the event to fire is to run a Session.Abandon, but is that really practicle? When a user is down they will probably close out the browser or navigate somewhere else. I want to keep a total count of users in an Application state variable but I cannot count on the decrement code to run. What can I do to keep up with Total Users...
1
1734
by: PAUL MITCHELL | last post by:
Hello, bit of strange one this, I have a VB .net application that has Sub Main() as its startup procedure, this then creates and shows a form. Up till now when I pressed F5 the form would duly appear. Whats happening now is the project appears to start but the form doesnt show. The process appears in Task manager but in VB .net the the blue bar at the top still still says and the usual stop button isnt there and the IDE just appears to...
2
2929
by: kohoutec | last post by:
Hi Im very much a beginner so apologies if my terminology is wrong. I have a combo box with some items already loaded, the users can also enter a new item. If they enter a new item and then press return on the keyboard I want to fire a buttons click event. I know I've seen how to do this somewhere but for the life of me cannot remember where!
1
17781
by: thewickedman | last post by:
Hi, I try to open new OpenOffice document (writer), But I am getting the exception FRM 40735:WHEN-BUTTON-PRESSED Trigger Raised unhandled Exception ORA - 305500 Please help me to resolve this exception. my code is as follows in when-button-pressed trigger:
4
6148
by: gamesforums | last post by:
Hi! I have some code within the Application_Start event in Global.asax that runs a sqlscript against my sql server to check the databas version. My problem is that sometimes the Application_Start event doesnt fire, it skips it and goes directly to my default.aspx file. I do the following: 1. IISReset.
17
2674
by: yawnmoth | last post by:
http://www.frostjedi.com/terra/scripts/demo/this-alert.html http://www.frostjedi.com/terra/scripts/demo/this-alert2.html Why, when you click in the black box, do the alert boxes say different things? Shouldn't they say the same thing?
0
8678
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
8609
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
9166
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
9030
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
8899
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
8871
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
7737
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...
0
5861
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();...
3
2007
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.