faqts : Computers : Programming : Languages : JavaScript : Event handling

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

46 of 68 people (68%) answered Yes
Recently 7 of 10 people (70%) answered Yes

Entry

How do I disable the "Control+N" event for a new window in IE 5.5?

Feb 13th, 2003 12:37
Sanoj Shivashankaran, Ryan Wilkerson,


Add the following code
<script language="javascript">
document.onkeydown = funDown;
 function funDown() 
 { 
     if(window.event && window.event.keyCode == 17)  
     { // Capture and remap ctrl
       window.event.keyCode = 555; 	
       return false; 
     } 
     if(window.event && window.event.keyCode == 82)  
     { // Capture and remap R
       window.event.keyCode = 555; 	
       return false; 
     } 
     if(window.event && window.event.keyCode == 78)  
     { // Capture and remap N
       window.event.keyCode = 555; 	
       return false; 
     } 
 }
</script>