468,484 Members | 2,113 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,484 developers. It's quick & easy.

need a popup window to be always in focus

Hi,

first I must admit this is one of the most active group I have ever seen.

For my question: is it possible to create a small popup window that remain
in focus until it is closed. That is, even if you click on the main (caller)
window just beside the popup, the popup would remain in focus. I've tried
"alwaysRaised" with window.open() function but it doesn't work, must be for
something else!!!

Thanks!
Moist
Jul 23 '05 #1
2 3528
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.
Jul 23 '05 #2
It is indeed for a small Intranet, it will be used as an entry form.
The "showModalDialog" is perfect.

Thanks!
Moist

"Yann-Erwan Perio" <y-*******@em-lyon.com> a écrit dans le message de
news:41***********************@news.free.fr...
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/a.../methods/showm
odaldialog.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.

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Mica Cooper | last post: by
4 posts views Thread by VR | last post: by
13 posts views Thread by ldan | last post: by
11 posts views Thread by Alex.Svetos | last post: by
7 posts views Thread by anthony.turcotte | last post: by
2 posts views Thread by gieforce | last post: by
reply views Thread by theflame83 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.