faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

33 of 41 people (80%) answered Yes
Recently 8 of 10 people (80%) answered Yes

Entry

How can I disable F3 in Internet Explorer 4?

Apr 5th, 2008 19:16
ha mo, Tony Crosby, Suds Malone,


<script>
document.onkeydown=checkKeys
function checkKeys()
{
if (event.keyCode==114)
{
event.keyCode=0;
return false;
}
}
</script>
 I tested this in IE5.5 and it works just fine, I don't see why it 
wouldn't work for Ie4.
 The keycode for F3 is 114 so by checking which key was pressed each 
time the user presses a key we can cancel any combination of keys this 
way.
 Note that the window or frame which this is loaded in must be in focus 
for this to work, since 'document.onkeydown' is the key to initiating 
the keycode inspection if it's in another document that the key is 
pressed the browser will ignore the code in the innactive document.
 Tony
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com