Opening a help system when the user presses the F1 key

This demo opens a help topic when you press the F1 key.

How to see the demo

Press F1.

Code

<head>
<script>
function openHelp() {
window.open('helppage.htm', 'helpwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=200,height=300');
}
</script>
</head>

<body bgcolor="#FFFFFF" onHelp="openHelp();return false">

How it works

This script uses the onHelp event in the body tag to open the help window. In Internet Explorer, the onHelp event is triggered when you press F1. This script also uses "return false" to prevent the browser from opening its own help system.

Browser compatibility

The onHelp event is only supported by Internet Explorer. Other browsers will open their own help system.

Questions?

Just send us an email.