I feel like I am being interviewed.....
Hehe. Just trying to get a feel for what's going on. If I'm going to use this, I want to know what it does.
Certain older browsers needed the event reference to be passed.
If that's the case, wouldn't you want to
always refer to the variable that was passed, rather than some of both? In your code, you have these two lines:
if (window.Event) keyCode = evt.which;
else keyCode = event.keyCode;
The first refers to the passed variable while the second refers to the variable as if it were global. I imagine it would be safer to do this:
if (window.Event) keyCode = evt.which;
else keyCode = evt.keyCode;
Is that correct?
Thanks for all the help, Eric.