0

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.

1
Contributor
2
Replies
4
Views
3 Years
Discussion Span
Last Post by Steviebone
0

Congratulations! You're no longer a DaniWeb newbie.<br /> <br />
Your DaniWeb account has just been upgraded from newbie status and now you have the ability to take advantage of everything the community has to offer.<br /> <br />
You can now enjoy an advertisement-free DaniWeb by ticking the checkbox to Disable Ads in your profile. You will no longer have to fill out the human verification check when you post. You can also now send unlimited private messages, participate in live chat, contribute new code snippets, and tag articles with never-before-used tags.

0

The answer is to use mousedown instead of onclick for this. This works for my use and is apparently how google and Bing handle click thru tracking...

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.