473,378 Members | 1,500 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,378 software developers and data experts.

onclick doesn't fire when CTL-key is pressed

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 1357
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
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...
14
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...
1
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...
4
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...
1
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...
2
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...
1
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...
4
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...
17
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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...

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.