473,398 Members | 2,380 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

question about window.showModelessDialog()

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
Jul 23 '05 #1
3 6171
datactrl wrote:
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.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #2
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
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.

--
Grant Wagner <gw*****@agricoreunited.com>
comp.lang.javascript FAQ - http://jibbering.com/faq

Jul 23 '05 #3
datactrl wrote:
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.
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Fred Basset | last post by:
I am modifying existing code to add modal functionality to an IE5+ ActiveX Web-App. What I am trying to achieve is simple modal behaviour on popup windows, apart from certain specified ones. I...
4
by: Simon Wigzell | last post by:
I have a couple of utility windows - a calculator and a calendar that popup from my main window. I would like them to always stay in front of the parent window until they are shut down with there...
6
by: Cortes | last post by:
Hi all, I have this parent window poping up the child window. SOmething like this popupWinA= window.open("child.html","popupWinA"," width=300 , height=150) I want this child popupWinA always...
1
by: Dustin II. | last post by:
I have a web form that I use to gather information from other windows. Is there a way that when my aspx page loads it stays on top of all the other windows? I don't want it to keep focus though.
5
by: anand basha | last post by:
what is the replacement for window.navigate in mozilla & i was used window.showmodelessdialog in IE5 - in mozilla it is not working *** Sent via Developersdex http://www.developersdex.com...
1
by: sathyanrockie | last post by:
Plase tell me what is the difference between window.open and window.showmodelessdialog. Can we use window.showmodelessdialog in place of window.open?
0
by: Laurahn | last post by:
Hi: i'm using modal window (showmodelessdialog) on asp. when the object is created i used session variables. After the object is closed the data is remaining on the modal window when is open...
1
by: Laurahn | last post by:
Hi: i'm using modal window (showmodelessdialog) on asp. when the object is created i used session variables. After the object is closed the data is remaining on the modal window when is open...
1
by: elizayiu | last post by:
Hi, I need to write a webpage which does the following: - open up a window and pass parameters into it (i.e. need to call showModalDialog() or showModelessDialog()) - contains jscript to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.