J
joe.osowski
I've been staring at this a while, and I haven't had much luck with it.
So I figure I'll try Usenet.
No matter what I try, it seems the event.button property is always "0".
Here is my test case HTML, can anyone tell me what I am doing wrong?
Thanks in advance.
<HTML>
<script language="javascript">
function log()
{
debugWrite("button: " + event.button);
debugWrite("keyCode: " + event.keyCode);
debugWrite("type: " + event.type);
}
function debugWrite(testString) {
document.all.debug.value = document.all.debug.value + (new
Date()).getHours() + ":" + (new Date()).getMinutes() + ":" + (new
Date()).getSeconds() + ":" + (new Date()).getMilliseconds() + " - " +
testString + "\r\n";
}
</script>
</HEAD>
<body class="gradient" bottomMargin="0" leftMargin="0" topMargin="0"
rightMargin="0" MS_POSITIONING="FlowLayout"
onload="document.all.debug.value='';">
<form>
<input type="text" name="test" id="test" size="20" onClick="log();"
onFocus="log();" onKeyDown="log();">
<input type="button" name="test" id="button" size="20"
onClick="log();" onFocus="log();" onKeyDown="log();">
<br>
<br>
<textarea id="debug" style="width:700px; height:500px"></textarea>
</form>
</body>
</HTML>
So I figure I'll try Usenet.
No matter what I try, it seems the event.button property is always "0".
Here is my test case HTML, can anyone tell me what I am doing wrong?
Thanks in advance.
<HTML>
<script language="javascript">
function log()
{
debugWrite("button: " + event.button);
debugWrite("keyCode: " + event.keyCode);
debugWrite("type: " + event.type);
}
function debugWrite(testString) {
document.all.debug.value = document.all.debug.value + (new
Date()).getHours() + ":" + (new Date()).getMinutes() + ":" + (new
Date()).getSeconds() + ":" + (new Date()).getMilliseconds() + " - " +
testString + "\r\n";
}
</script>
</HEAD>
<body class="gradient" bottomMargin="0" leftMargin="0" topMargin="0"
rightMargin="0" MS_POSITIONING="FlowLayout"
onload="document.all.debug.value='';">
<form>
<input type="text" name="test" id="test" size="20" onClick="log();"
onFocus="log();" onKeyDown="log();">
<input type="button" name="test" id="button" size="20"
onClick="log();" onFocus="log();" onKeyDown="log();">
<br>
<br>
<textarea id="debug" style="width:700px; height:500px"></textarea>
</form>
</body>
</HTML>