chrisvmarle
02-26-2003, 12:01 PM
Hi All,
For my site I'm using this script:
function check_key() {
kc = event.keyCode
if(kc>=65 && kc<=90) {
chr = String.fromCharCode(kc).toLowerCase()
document.location.href = "#" + chr
}
return true
}
document.onkeydown=check_key;
The problem is, if this script is active I'm unable to enter anything in a textbox
I'm almost sure there's a way to check event for the selected type of the document (wich would be "text" for <input type="text">). If someone could tell me how to do that I know how to handle the rest :)
Thanks in advance
Mzzl, Chris
For my site I'm using this script:
function check_key() {
kc = event.keyCode
if(kc>=65 && kc<=90) {
chr = String.fromCharCode(kc).toLowerCase()
document.location.href = "#" + chr
}
return true
}
document.onkeydown=check_key;
The problem is, if this script is active I'm unable to enter anything in a textbox
I'm almost sure there's a way to check event for the selected type of the document (wich would be "text" for <input type="text">). If someone could tell me how to do that I know how to handle the rest :)
Thanks in advance
Mzzl, Chris