need a popup window to be always in focus

M

Moist

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
 
Y

Yann-Erwan Perio

Moist said:
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.
 
M

Moist

It is indeed for a small Intranet, it will be used as an entry form.
The "showModalDialog" is perfect.

Thanks!
Moist
 

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

Members online

No members online now.

Forum statistics

Threads
474,436
Messages
2,571,696
Members
48,796
Latest member
Greg L.
Top