Jump to content

Archived

This topic is now archived and is closed to further replies.

Thierry

Return to a window on a key press

Recommended Posts

Im using the event.keyCode so the use can switch between windows (three of them) of the website.
This works fine while in one of the windows, but say Im typing in Word and I hit the key to switch, nothing happens.
Ofcourse, this is because the keys only work in the <body onload> part of the pages, but I was wondering if its possible for the key combination to be used when not focused on one of the windows.

Share this post


Link to post
Share on other sites
I'm not really good with JavaScript, but I think that you can use the focus() function. Something like: [code]blabla.document.focus();[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.