473,508 Members | 4,779 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3744
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
2981
by: Mica Cooper | last post by:
Hi, I have a series of Select menus on a page. I am trying to allow the user to click on the Select title and have it popup a help window. This works fine with the following code except that all...
3
3195
by: gb | last post by:
Hi, How do you print a dynamically produced popup. Everything I try such as self.print() prints out the original or parent page. Banging my head against a wall time? Can the popup object be...
4
2414
by: VR | last post by:
First, greetings to everyone :) I'm doing a university seminar & I've encountered a problem. I have a gallery with thumbnails linked on pictures. What I want is popup to be opened with...
15
18696
by: | last post by:
So many websites can get around my Googlebar's popup blockers. Even Opera 8 can not stop those popups. I looked into the codes, and I can find nothing showing me how it is done. Can anyone help me...
1
8793
by: nospam | last post by:
All I am trying to achieve the following: Main window page's asp code writes the following line to launch a popup window (note the IFRAME has to be in the popup window, it cannot be in the...
13
6241
by: ldan | last post by:
Hi everybody, I would not consider myself an expert in javascript - but so far whatever I know, helped me reaching my goals. Recently I started to experience a lot of javascript errors related...
11
7320
by: Alex.Svetos | last post by:
Hello, I'm trying to get a popup to keep focus when it is re-clicked. The script below is supposed to produce this exact behaviour, however it doesn't work, at least on firefox 1.0.7 and moz...
7
3648
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
3
7353
by: Jimmy | last post by:
It is also possible for popup window to call function in main window by using the opener property. Will "opener.someFunctionInMain(param1, param2)" in the popup window work? It's possible for...
0
7332
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7393
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7058
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5635
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3206
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3191
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1565
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
426
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.