[Javascript] Keypress and a name jump
Guillaume
javascript at webdesignofficina.com
Fri Jan 5 11:03:59 CST 2007
Sorry this is a recall... I feel realy sorry if this one is disturbing
your inbox...
I can't believe no one has an answer:
I'm using the function below to detect a keypress and I'd like also when
this key is pressed to jump to a <a name="thereUgo"> in my document...
Just as you would jump to a content <a name="thereUgo"> when you click
on a <a href="#thereUgo>... Except that I try to do this with the
keypress script below...
Any ressource to point or solution to suggest ?
Thanks.
Guillaume.
Here's the keypress script I use:
function getKey(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
key = String.fromCharCode(keycode).toLowerCase();
if(key == 't'){ myFunction(); }
return false; }
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20070105/9da0cfed/attachment.htm>
More information about the Javascript
mailing list