Solved

Prohibiting F5 Key in browser

Posted on 2009-05-11
5
383 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
[X]
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
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Problem I downloaded the Microsoft Internet Explorer 9 Beta, today, to give it a test drive and maybe write a review for the site, and it failed miserably and got stuck in a crash restart loop. The error message given is as illustrated below i…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
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…

730 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