GavinPearce
05-12-2003, 01:55 PM
Rite I really have got stuck doing this script someone plase help, it's got my mind boggoling. I'm quite good at js for a 14 yr old but this has really got me confused, i have read and read and read about and but still can not figure it out. This three links have been given to me, perhaps you'll find them useful.
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/event.html#1196474
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_event.asp
http://www.webreference.com/js/tips/991024.html
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var key = new Array(); // Define key launcher pages here
key['h'] = "index.html";
key['f'] = "feedback.html";
key['n'] = "new.html";
key['s'] = "toc.html";
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>
http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/event.html#1196474
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/obj_event.asp
http://www.webreference.com/js/tips/991024.html
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var key = new Array(); // Define key launcher pages here
key['h'] = "index.html";
key['f'] = "feedback.html";
key['n'] = "new.html";
key['s'] = "toc.html";
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>