Close popup automaticly when lost focus

S

Steve Easton

You can try this in the body tag.
Not sure if it will work in all browsers.
It "should" close the window if a viewer
clicks outside of the popup.

However it takes a positive action by the viewer,
as the pop-up retains focus until the viewer does
"something" with the keyboard or mouse.

<body onfocusout="parent.close()"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top