This element is the only disabled=false element on the form:
<HEAD>
....
<SCRIPT type="text/javascript">
<!-- Begin
function ValidateKey(e);
e = event || window.event;
var key;
var skey;
if (document.layers){
key = e.which;
skey = e.which;
} else {
key = e.keyCode;
skey = e.keyCode;
}
alert(key);
// ...
return (true);
}
// End -->
</SCRIPT>
....
</HEAD>
<BODY onload="javascript:document.forms['frm1'].elements['1'].focus(); ...."
....
<FORM id="frm1" ...>
<INPUT id="1" type="text" onkeydown="javascript:ValidateKey();" ..../>
....
When the document loads a message comes up which says 0. This seems wrong to me since no key was pressed. I understand why though. But what makes it worse is that if the message box is OK'd and the user types ANY character key such as m; p; t;... but not either of the ctrl keys or alt (those kind) on the keyboard, a message box comes up that says 0.
And then the issue is compounded because if the user OK's that message box and types another character, those that I described above then no message box; which is what I expect in the whole procedure here. The first one I can deal with but my "what makes it worse" is really uncalled for and I cannot figure out how to get the first key entered to not return 0. Thanks.
--
George Hester
__________________________________