Home Articles FAQs XREF Games Software Instant Books About Feedback Search Site-Map
irt.org logo

Q1398 How do I keep a pop-up window forced always active and in front, yet allow users to enter values in form fields?

irt.org | Knowledge Base | JavaScript | Form | Q1398 [ previous next ]

Q1398 How do I keep a pop-up window forced always active and in front, yet allow users to enter values in form fields?

Submitted by Ben Crosson:

There seem to be 5 or 6 entries in this FAQ which imply that this isn't possible. They simply suggest putting onBlur="self.focus()" in the body tag. However, this locks users out from entering information into form fields. It is possible to get around this though. Simply put the follwing 2 functions in the header of your page, and then in the body tag, as well as in the tag of every form field, put onBlur="blurred()" onFocus="focused()". This will solve this often complained about problem.

<script language="JavaScript">
var timer = '';
function blurred() {
    timer = setTimeout('self.focus()',1);
}

function focused() {
    if (timer != '')
        clearTimeout(timer);
}
</script>

Feedback on 'Q1398 How do I keep a pop-up window forced always active and in front, yet allow users to enter values in form fields?'


Provide feedback ...
AddThis Social Bookmark Button

Provide feedback ... AddThis Social Bookmark Button


Last Updated: 30th March 2008. Maintained by: Martin Webb and Michel Plungjan
irt.org liability, trademark, document use, privacy statement and software licensing rules apply.
Copyright © 1996-2008 irt.org, All Rights Reserved.