Moist wrote:
For my question: is it possible to create a small popup window that remain
in focus until it is closed.
Unfortunately you cannot do that correctly in a cross-browser way (not
even mentioning popup-blockers); usual approaches used blur events on
the popup (if it's blurred, then focus it, but beware not to steal the
focus from a popup element), but I believe them to be unreliable at best.
If you're concerned with IE only (e.g. for an intranet), then have a
look at the showModalDialog method, which does exactly what you're
looking for.
<URL:http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/showmodaldialog.asp>
Alternate approaches to popups include so-called "in-window" popups,
which are DIV-based and therefore modeless; making them modal might also
be doable, but without an acceptable fallback I'm afraid.
<URL:http://www.litotes.demon.co.uk/js_info/pop_ups.html>
All in all, if you're targeting a web environment with unknown user
agents, I'd strongly encourage you to re-design the part of your
application requiring a popup to avoid the usage of popups; that would
save you further problems in the future.
HTH,
Yep.