?
Solved

Prohibiting F5 Key in browser

Posted on 2009-05-11
5
Medium Priority
?
391 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 2000 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

I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
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 +…
Suggested Courses

777 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