Forum Moderators: open
it basically just changes the page when you hit certain keys
it works in IE (and supposedly in Netscape but i haven't tried) but not with firefox
how can i modify it?
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var key = new Array(); // Define key launcher pages here
key['n'] = "URL1";
key['l'] = "Url2";
key['s'] = "url3";
key['r'] = "url4";
function getKey(keyStroke) {
isNetscape=(document.layers);
// Cross-browser key capture routine couresty
// of Randy Bennett (rbennett@thezone.net)
eventChooser = (isNetscape)? keyStroke.which : event.keyCode;
which = String.fromCharCode(eventChooser).toLowerCase();
for (var i in key) if (which == i) window.location= key[i];
}
document.onkeypress = getKey;
// End -->
</script>
For reference: key events demo [cross-browser.com]
</body>
</html>