|
In the following code in Internet Explorer I am trying to disable the browser-specific help and launch a pop-up window on F1 key press. The pop-up window alone launches when I press F1. If the pop-up window is now minimised and I press on F1 again, the pop-up window comes to focus. But if the pop-up window is on focus and I press F1 again, the browser-specific help is launched. How do I prevent this?
<script language = "javascript">
function dispHelp(){
var keyCode = event.keyCode;
if(keyCode == 112){
features="height=400,width=700,status=yes,location=no,top=200,left=200";
winId = window.open( "http://www.yahoo.com", 'appHelp', features );
winId.focus();
return false;
}
}
function disableDefault(){
event.returnValue = false;
return false;
}
</script>
<body onkeydown="dispHelp();" onhelp="disableDefault();">
|
|
|
|
|
|
|
|