Solved

Prohibiting F5 Key in browser

Posted on 2009-05-11
5
385 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
 

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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Bada platform is becoming more and more famous this days and people talking about same. Some friends included those who have bada OS mobile asked me "what is bada?"and "what its features?". That encouraged me to research and write this article. [st…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

729 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