Click to See Complete Forum and Search --> : New window on top?


Judi Dressler
01-31-2003, 03:48 PM
Hello,

Does anyone have any ideas on how to get a pop-up window to stay on top of the main window, even when the viewer clicks on the main window?

I'm guessing the reason there's no easy way to do it is to prevent advertisers from doing it with their popups...

Perhaps there's a setting to keeping the main window on the bottom? Or some code in the main window that automatically brings the smaller window back in front whenever anyone clicks on the main one?

I don't do much javaScript coding, so very much appreciate any ideas you may have. Thank you in advance!

-- judi

dressler@colorado.edu

Sergey Smirnov
01-31-2003, 04:20 PM
just for Internet Explorer, use showModalDialog instead of open regular window.

Judi Dressler
01-31-2003, 06:32 PM
Sergey, thanks for your reply - I checked out the showModalDialog function and it's true that it doesn't let the parent window take over in the foreground, but it also turned out that it doesn't let me click on (activate) anything in my interactive parent window either, so I can't use the function -- darn!

Any other ideas that let me interact with the parent window while still keeping the child window in front are much appreciated.
Thank you!

-- judi

swon
01-31-2003, 06:37 PM
for a normal window.open, you can do only a setTimeout script which gives back the focus every 2 or a few seconds to the window!

Sergey Smirnov
01-31-2003, 06:46 PM
Judi,

I didnot understand your question correctly. Sorry. It looks like you want to have window like a Window Task Manager, that is on the top even it is not active. I think, there is no solution using javascript.
You can put <BODY onblur="window.focus()"> to do very small portion of activety in parent window, or you can emulate window with DIV, but it will not the same as in case of Window Task Manager.

Sergey Smirnov
01-31-2003, 07:07 PM
This is an example of using layers
http://www.jsmadeeasy.com/javascripts/DHMTL%20Miscelanious/Always%20On%20Top%20Content/

Works correctly only in IE

Zach Elfers
01-31-2003, 10:02 PM
You could use <body onBlur="this.focus();">, but that would get VERY annoying for the visitor.