Home Articles FAQs XREF Games Software Instant Books BBS About FOLDOC RFCs Feedback Sitemap
irt.Org
#

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

You are here: irt.org | FAQ | JavaScript | Form | Q1398 [ previous next ]

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?'

©2018 Martin Webb