Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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
  • 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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

564 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