"Help" child window on top

I am having problems trying to get a child window to come up "on top", and come up again on top when reinvoked.

On each of my pages, I have a link to create a Help child window:

<script language="JavaScript">
var newWin
function openHelp() {
newWin=window.open("context.htm","help","width=200 height=200");

where "context.htm" represents the context-sensitive help page corresponding to the help needed for the current page.

However, once the user has brought up this help child-window (the first time, it will appear on top), if she mistakenly clicks on the main window instead of closing the help window, then she will push the child help window back.  Thereafter, whenever she clicks on a help link in a main window, the appropriate help text will flow into the help child window, but the help window will remain BEHIND the main window, and the naive user will think that the help links are no longer functional.

Is it possible to bring a child window to the fore (on top).  Or possible, perhaps, to close a child help window (from any page) and then bring it up anew, so that it comes up on top?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

In your context.htm file(s), put the following in your body tag:

<body onLoad="window.focus()">

Well, the solution Kurt gave keeps a window on top, and this might be what you want, but the irritating part about this is that first now this window must be closed and no interaction can take place between other windows.
I had the same problem you have, pbrooks, for a client, but I solved it after a while. To see an example work, check out http://joseph.auvicom.nl and click on the appropriate link. Then you can view the source and see how it's done. Note that AND the child windows opened AND the parent window both have code necessary to let this work. I will give hints in the code ok?

Michel PlungjanIT ExpertCommented:
Joseph, you mistake it for onBlur=focus

The code Kurt posted is fine for focussing when the page is loaded and only then. I prefer this amendment to stop IE3 from complaining:

<body onLoad="if (window.focus) self.focus()">


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

OH, yeah, Kurt, forgive me please ;) Thx Michel. But this way it keeps opening a new window, doesn't it?

Michel PlungjanIT ExpertCommented:
No. The window named help will be reused.

pbrooksAuthor Commented:
Thank you, Michel.  That does the trick.

Joseph: the problem with your solution is that I think it requires a javascript variable (NewWin?) to be shared amongst all of the web pages that call help pages, in order to close the background help page.  If the child help page remains up, but I go to another main page, and click on help there, the child page's window variable is no longer accessible in the new page, and therefore the child window cannot be closed.
Yes, I understand, what Michel proposed here seems for this the best solution. And I also learned a thing with this. Thanks Michel!

Joseph ;)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.