"Hamish" <No****@gmail.c om> wrote in message
news:cm******** **@titan.btinte rnet.com...
I am trying to detect the up and down keys on a key press function, but
they do not seem to generate a keypress call. Is there another event generated
when these keys are pressed
Thanks.
PS Apologies if this appears as a double post, but the news server I used
originally does not seem to propagate most other news servers.
Will this help?
http://cita.rehab.uiuc.edu/courses/2...1/slide14.html
<html>
<head>
<title>onkeys.h tm</title>
<script type="text/javascript">
function onkey(what) {
if (what == "") {
window.status = "";
document.forms[0].txt.focus();
} else {
window.status += what + " ";
}
}
</script>
</head>
<body onload="onkey(' ')">
<form>
<input type="text" name="txt"
size="1" maxlength="1"
onkeypress="onk ey('onkeypress' )"
onkeydown="onke y('onkeydown')"
onkeyup="onkey( 'onkeyup')">
<input type="button" name="but"
value="Clear" onclick="onkey( '')">
</form>
</body>
</html>