473,414 Members | 1,737 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,414 software developers and data experts.

How to child window always ontop

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 stay on top of the parent window no
matter where the focus is (so that when you click the parent, the child
doesn't *disappear* because if its small size).

Is there any way to do this?
any reply will be greatly appreciated. Thanks

Wish you all have a good day!
Jul 23 '05 #1
6 12055
"Cortes" <tv*********@yahoo.com> schrieb im Newsbeitrag
news:40******@duster.adelaide.on.net...
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 stay on top of the parent window no
matter where the focus is (so that when you click the parent, the child
doesn't *disappear* because if its small size).

Is there any way to do this?


I don't think so. You can add onBlur="self.focus()" to the small window's
document's body tag, but of course the parent window will loose focus then.
If the information in the small window has to be always visible you will
have to redesign your site and include that information in the parent's
documents. Like that you also avoid all popup-related problems.

For a lot of cases the task is not actually that the popup stays visible but
that it should regain focus when reloaded (i.e. for slide shows or
whatever). You can achieve that with onLoad="self.focus()", or by closing it
when it gets behind the parent window (onBlur="self.close()").

If you are a frequent newsgroup user you know of course that the best way is
avoiding popups at all.

HTH
Markus
Jul 23 '05 #2
Thanks Markus, much appreciated!

My popup is something like the finder popup in Microsoft Internet Explorer.
So it had better stay visible all the time.

I just found out in Netscape 4.0 you have something like

popup=window.open("child.html","child", alwaysRaised= yes);

which will make the child always floats ontop no matter if it is active or
not.

However, Microsoft IE doesn't support it :(. I don't know if there is a
workaround?

I wish you all a very good day!
Jul 23 '05 #3
> which will make the child always floats ontop no matter if it is
active or not.

However, Microsoft IE doesn't support it :(. I don't know if there is
a workaround?


What you are looking for is the following:
http://msdn.microsoft.com/workshop/a...lessdialog.asp

And play with it here:
http://msdn.microsoft.com/workshop/s...lessDialog.htm

Though only supported by MS ofcourse :) but I'm sure there are solutions
for mozilla.

Good luck,
Vincent
Jul 23 '05 #4
DU
Cortes wrote:
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 stay on top of the parent window no
matter where the focus is (so that when you click the parent, the child
doesn't *disappear* because if its small size).

Is there any way to do this?
any reply will be greatly appreciated. Thanks

Wish you all have a good day!


1- The 3rd argument in the window.open call is a string (between a pair
of quotes) without any blank space in it, otherwise, NS 6+ and
Mozilla-based browsers will not comply with the specifications requested
in the windowFeatures list.

2- alwaysRaised requires enhanced security privileges in NS 4, NS 6+ and
Mozilla-based browsers

3- I strongly advised against onblur="self.focus();" which will confuse
users and abuse their system resources. I'm absolutely convinced there
can be a better way, a more user-friendly way to achieve what you want
if only you would elaborate on your webpage design goals, requirements.

Modal solutions (like showModalDialog and showModelessDialog) are
extreme solutions which, when improperly, unjustifiably used, often
alienate users than anything. At the very least, you should always give
some kind of veto power to your users if they want to turn off your
"finder popup". Be aware that power Mozilla users will know how to
neutralize an inflexible modal popup while others can always use the
back button or the close window button of their browser on your site.

DU
Jul 23 '05 #5
Hi,
All other posts have correctly advised you about the use and abuse of pop-ups.
I would suggest a back on top interval.

<body onload='setInterval("self.focus()",1500);'>

Hopefully this would pop the pop up back every 1.5 secs or so
if it happens to lose focus.

Kien

DU <dr*******@hotWIPETHISmail.com> wrote in message news:<ca**********@news.eusc.inter.net>...
Cortes wrote:
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 stay on top of the parent window no
matter where the focus is (so that when you click the parent, the child
doesn't *disappear* because if its small size).

Is there any way to do this?
any reply will be greatly appreciated. Thanks

Wish you all have a good day!

Jul 23 '05 #6
"Kien" <ca*********@hotmail.com> schrieb im Newsbeitrag
news:16**************************@posting.google.c om...
Hi,
All other posts have correctly advised you about the use and abuse of pop-ups. I would suggest a back on top interval.

<body onload='setInterval("self.focus()",1500);'>

Hopefully this would pop the pop up back every 1.5 secs or so
if it happens to lose focus.


Huh... imagine the user is actually scrolling, reading some text, or filling
in a form at the moment the popup is coming back to the top... there are
less things on the web that are more confusing than unexpectedly opened
windows.

Markus
Jul 23 '05 #7

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

Similar topics

2
by: Bostonasian | last post by:
I am trying to append options to dropdown in parent window from option items in child window. In parent window, I have following code: <script language="javascript"> function...
10
by: CyberBless | last post by:
I have a page that opens a child window using window.open(...). How do I make so that when that child window opens you cannot get the focus back on the parent window unless you close the child...
5
by: VM | last post by:
When I try to open a window (this small window is 198x190 in size) through the MDI menu with: frm_export frmExport = new frm_export(); frmExport.MdiParent = this; frmExport.Show(); it opens...
2
by: Raj | last post by:
Hi All, I have a problem with trying to refresh the parent window from child window in order to update data in the parent window. The sequence of events are 1) I click a button in the parent...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
1
by: MrFez | last post by:
I have an webform from which I open a child window to display a calendar. When a date is selected in the calendar window it attempts to set the value of a textbox in the main (parent) window by...
2
by: ajain1 | last post by:
Folks, I want to refresh my child window after a particular interval of time, its working with the following code, but after getting refresh its always forward me on first URL not on the current...
1
by: newsteve1 | last post by:
hello, i have a parent page with a bunch of photos. clicking on the first photo will lead to a new child window with a close-up of that photo AND from there you can cycle through all of the other...
4
HaLo2FrEeEk
by: HaLo2FrEeEk | last post by:
I have an application that has 2 forms, a child and a parent. I want to make sure that the parent window can never be inside the child window in any way, so the code will need to check if any part...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.