question about window.showModelessDialog()

D

datactrl

Hi, all

When I use window.showModelessDialog() to open a window. And then on the
opened window to open an another window with the same function,
window.showModelessDialog(). The last opened one is always on the top of the
first opened one. Is there any "work around" to have the first opened one go
to the front? Thanks in advance!

Jack
 
G

Grant Wagner

datactrl said:
Hi, all

When I use window.showModelessDialog() to open a window. And then on the
opened window to open an another window with the same function,
window.showModelessDialog(). The last opened one is always on the top of the
first opened one. Is there any "work around" to have the first opened one go
to the front? Thanks in advance!

Jack

window.showModelessDialog() returns a window object reference that appears to
respond to the standard window object interface, for example:

var w1 = window.showModelessDialog('http://www.microsoft.com');
var w2 = window.showModelessDialog('http://www.yahoo.com');
w1.focus();

appears to work correctly. So perhaps after you open the 2nd modeless dialog,
call window.focus() on the initial modeless dialog to pull focus back to it.
Untested.
 
D

datactrl

Thanks, Grant

The case is there are 3 windows. window 1 uses window.showModelessDialog()
to open window 2 and window 2 uses window.showModelessDialog() to open
window 3. The window 3 will be on focus after all. Then when I click window
2, window 2 is on focus, but it is always behind window 3. It can't go on
top of window 2 even when it is on focus.

Jack
 
F

Fred Oz

datactrl said:
Thanks, Grant

The case is there are 3 windows. window 1 uses window.showModelessDialog()
to open window 2 and window 2 uses window.showModelessDialog() to open
window 3. The window 3 will be on focus after all. Then when I click window
2, window 2 is on focus, but it is always behind window 3. It can't go on
top of window 2 even when it is on focus.
[snip]

showModalDialog was introduced with IE 4, showModelessDialog with IE 5.
AFAIK, no other browser supports them - so for those users, the above
is not an issue since nothing will happen when you try to execute the
function.

Please consider using some other method to achieve what you are after,
or at least use feature detection and warn users of non-IE UAs.

Cheers, Fred.
 

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
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top