Controlling other windows with DHTML

I've got two windows (non-framed) that I'd like to switch the focus between using something like

windowName.focus()

Each window has been given a unique name.

Any ideas anyone?
LVL 2
moehlerAsked:
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.

nettromCommented:
how did you open the second window?  is the document in the second window on the same domain as the one in the first window?
0
robbertCommented:
If the window.opener is still open, you could call a function at him that focusses the appropriate window.
Otherwise, how will window1 know of window3, resp., be able to call it, if it is not the opener?
0
moehlerAuthor Commented:
In my scenerio, I have a selection form that creates a WebFocus report in a new window and keeps selection form for running additional reports. I want to do some cleanup on the form window, but then return the focus back to the resultant report.

Does that make sense? Should I provide any additional information?

Thanks
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

robbertCommented:
"but then return the focus back to the resultant report."

window.opener.focus(), after doing some work.

Or is there another issue?
0
moehlerAuthor Commented:
But dosn't window.opener.focus() go back to the form? What syntax do I use to go back to the report? I create the report with target="report".
0
nettromCommented:
oh.  so you have a window opened named "report", but you haven't got a JavaScript object with it (in other words, you didn't use "window.open()" to open the "report" window)?

you can fetch a handle to the window using:

myWindow = window.open('','report');

and then do:

myWindow.focus();

to get it to front again.
0
moehlerAuthor Commented:
Thanks guys. I got it resolved....I actually am using a blur for the selection form after I clean up. Since the form results window is the last window to have focus, the blur of the selection window, gives me the result I am looking for.

Since you both helped me in getting to the answer, I want to delete the question and split it into two...I'll be giving maximum grade so you can both receive 200 points.
Any problems with that? I'll wait for both of you to respond before doing so.
0
nettromCommented:
perfectly ok by me. :)
0

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
moehlerAuthor Commented:
Since Robbert has never responded. You get the points.

Thanks for your help.
0
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
Web Development

From novice to tech pro — start learning today.