By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,491 Members | 3,230 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,491 IT Pros & Developers. It's quick & easy.

capturing mouse and key events in parent window while child window is opened.

P: 1
I have used the following javascript code to get a child window for parent window.

childWin,"window","top=250,left=250,height =100,width=480,status=no,toolbar=no,menubar=no,loc ation=no");

As the child window is not a modal dialog, user can minimize the window and do other actions in parent window.
Please help me to avoid that.
Even if the child window is minimized, when user tries to do some action in parent window, minimized child window should pop up.User should only clo9se the child window and proceed furthur in parent window.

Thanks in advance.
May 11 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 16,027
Add mouse and key events to the document (onmousedown, onkeypress, etc.) and check if childWin exists. If it does, cancel the event and give focus to the child window. You should try to use this sparingly.
Jan 30 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.