TAW
03-21-2001, 05:37 PM
Here is the very much better version 1.1
Here is the basic code
Replace #KEY# with what key you want
Copy and paste if you want more in the same fashion
Give me some feedback :)
Place this code into headinclude template
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var key = new Array(); // Define key launcher pages here
key['#KEY#'] = "URL FOR THIS BUTTON";
key['#KEY#'] = "URL";
key['#KEY#'] = "URL";
key['#KEY#'] = "URL";
function getKey(keyStroke) {
isNetscape=(document.layers);
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>
That has to be placed into the <head>
Heres my example...
<!-- Begin
var key = new Array(); // Define key launcher pages here
key[' '] = "index.php";
key['f] = "search.php";
key['e'] = "javascript:history.go(-1);";
key['w'] = "usercp.php";
function getKey(keyStroke) {
isNetscape=(document.layers);
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>
Pressing spacebar takes you to Homepage of forums
f takes you to search
e goes to the last page
w goes to the profile section
Soon to come.... The number buttons to quickly go to a forum
ie - pressing one goes to forumdisplay.php?forumod=1
AND
this is my favorite
Shift + number..... eg ! (shift1)
Goes to newthread.php?forumid=1
Anymore suggestions?
NOTE: Be sure to tell your members by something in header or footer otherwise idle keyboard smashing sessions will get them very confused :-P
Here is the basic code
Replace #KEY# with what key you want
Copy and paste if you want more in the same fashion
Give me some feedback :)
Place this code into headinclude template
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var key = new Array(); // Define key launcher pages here
key['#KEY#'] = "URL FOR THIS BUTTON";
key['#KEY#'] = "URL";
key['#KEY#'] = "URL";
key['#KEY#'] = "URL";
function getKey(keyStroke) {
isNetscape=(document.layers);
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>
That has to be placed into the <head>
Heres my example...
<!-- Begin
var key = new Array(); // Define key launcher pages here
key[' '] = "index.php";
key['f] = "search.php";
key['e'] = "javascript:history.go(-1);";
key['w'] = "usercp.php";
function getKey(keyStroke) {
isNetscape=(document.layers);
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>
Pressing spacebar takes you to Homepage of forums
f takes you to search
e goes to the last page
w goes to the profile section
Soon to come.... The number buttons to quickly go to a forum
ie - pressing one goes to forumdisplay.php?forumod=1
AND
this is my favorite
Shift + number..... eg ! (shift1)
Goes to newthread.php?forumid=1
Anymore suggestions?
NOTE: Be sure to tell your members by something in header or footer otherwise idle keyboard smashing sessions will get them very confused :-P