JavaScript OR VBScript Right Click event capture

Posted on 2003-02-21
Medium Priority
Last Modified: 2012-05-04

I am currently trying to log a bunch of items which people download. The way I am doing this is through an ASP page that will redirect the user to the asp page which will steal the cookie/user info and log the data along with which item the person is downloading...

well for this to work perfectly i need to make it so people either cant right click the link or so that the right click event will in fact act as a click or OnClick event so that I can transfer the person through the asp logging page and redirect them to the item they are downloading...

worst part about this is that it needs to be compliant across NS and IE as well as across MAC and PC platforms...

anyone have any ideas... I have seen some things like this asked before but i've not seen anything that will capture across IE and NS on both MAC and PC

Question by:Otteriffic
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Accepted Solution

whammy earned 400 total points
ID: 7996460
You need to use server-side code for this - check out this example forcing the user to download a file, instead of opening it in their browser.

You can easily implement whatever tracking you want in combination with this, before you let them download the file, since they aren't going to be able to download it otherwise:


Expert Comment

ID: 7996464
P.S. Clear your mind of your previous ideas of using client side code for this!

This way, it is compatible with ALL browsers, since it is done on the server side. And it uses ASP. :-)

Author Comment

ID: 8103367
thanks a bunch!!!

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Having worked on larger scale sites, we found out that you are bound to look at more scalable solutions to integrating widgets, code snippets or complete applications and mesh them into functional sites, in any given composition. To share some of…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question