Solved

Prohibiting F5 Key in browser

Posted on 2009-05-11
5
381 Views
Last Modified: 2013-12-08
My web application uses internet explorer browser, and I need to prevent the user from hitting F5 key, Backspace key, ALT + Arrow Keys and Mouse right click events.
How do I accomplish this using javascript?
0
Comment
Question by:sputrevu
  • 2
5 Comments
 
LVL 6

Expert Comment

by:jaydee-cdgp
ID: 24361802
0
 

Expert Comment

by:isuhendro
ID: 24361826
have you tried Prototype Javascript library.. ? it should help you to produce better quality of code
0
 
LVL 11

Accepted Solution

by:
Muhammad Ousama Ghazali earned 500 total points
ID: 24362037
Whatever code you may try to restrict user from pressing F5 so the user simply could not cause multiple postbacks, as is the most common scenario, there is always alternates to perform the refresh of the page.

So it is better to code in your server-side script (ASP.NET, PHP) appropriately to restrict user from performing multiple postbacks.
0
 
LVL 11

Expert Comment

by:Muhammad Ousama Ghazali
ID: 24362071
Anyways, for quick overview into keyboard and mouse events: see these links:

http://www.javascriptkit.com/jsref/eventkeyboardmouse.shtml
http://www.quirksmode.org/js/events_properties.html

For a detailed discussion on events and cross browser compatibilities see these links:

http://www.quirksmode.org/js/introevents.html
http://www.quirksmode.org/dom/events/index.html
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

Internet is a big network which is formed by connecting multiple small networks.It is a platform for all the users which are connected to it.Internet act as platform in different fields. Such as: Internet  as a collaboration platform. Internet  as…
I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
This Micro Tutorial will demonstrate how to add subdomains to your content reports. This can be very importing in having a site with multiple subdomains.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

809 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