Click to See Complete Forum and Search --> : need debugind


vinsa
08-15-2003, 01:53 PM
Hi everyone!
I need a little help.
First - what is the keynumber of
"alt" button and spacebar.

Second - I use this script
to start function "SearchAble1()"
when I press Enter button.
But I have problem.
When I type something in
textarea and press Enter button
I can't start function "SearchAble1()".
If I don't type in textarea
the script work. I can't understand
what is the problem.
This problem is only when I
use Enter. If I us another
quick button (ex. 104=H) I have
not problem but I want to use Enter.

<script type="text/javascript">
<!--

var hotkey=13
if (document.layers)
document.captureEvents(Event.KEYPRESS)
function backhome(e){
if (document.layers){
if (e.which==hotkey)
SearchAble1();
}
else if (document.all){
if (event.keyCode==hotkey)
SearchAble1();
}
}
document.onkeypress=backhome

//-->
</script>

Khalid Ali
08-15-2003, 02:23 PM
Take a look at thi sresource ,Hope it'll help you
http://www.webapplikations.com/pages/html_js/document/CompleteKeyEventControl.html