Ok here is my problem, I need a script that will call a function when one of the arrow keys is pressed. The script I wrote works great in IE but I can’t seem to get it to function in Mozilla or Firefox. I would like to support as many browsers as possible but I am starting to think it’s going to be IE only for this projest ?…
Thanks in advance for any help below is the current script I am using.
<script type=”text/javascript”>
document.onkeyup = KeyCheck;
function KeyCheck()
{
var KeyID = event.keyCode;
switch(KeyID)
{
case 37:
parent.mapframe.moveImageLeft(‘MyPic’);
break;
case 38:
parent.mapframe.moveImageUp(‘MyPic’);
break;
case 39:
parent.mapframe.moveImageRight(‘MyPic’);
break;
case 40:
parent.mapframe.moveImageDown(‘MyPic’);
break;
}
}
</script>