onkeypress on frame

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

onkeypress on frame

Post by newmember »

hi

i have two frames. first frame contains menu.
i want to attach onkeypress event handler to that frame. there is no problem to make it work in firefox. any of this works:

window.onkeypress=handleKeyboardInput;
or
top.frames[0].onkeypress=handleKeyboardInput;
or
document.onkeypress=handleKeyboardInput;

but none of this works in IE.
(it works in IE if i don't use frames.)

any idea how can i make it work in ie?
Post Reply