Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

Javascript and Controlling Different Windows

Opening multiple windows with javascript and controlling them



2:04 pm on Oct 18, 2002 (gmt 0)

10+ Year Member

Not sure if Im in the right place to put this ...

I'm using javascript to open 2 windows up, lets say with the following code

"navigation=window.open ('navigation.asp', 'navigation')

Now I want the Navigation window to "control" the content window - the opening window will have nothing to do with this and sit in the background, so the question is "how do I reference the windows?"

For example there will be close button on the navigation window that will close itself and the content window. The closing self is easy, but how do I close the content window?

From what I am reading I should be able to use "content.close" or "window[content].close" but both are returning errors (generally of the type "object is empty or does not exists" or "conetent is undefined) although they work in the parent window. (ive also tried top.conetnt.close() and parent.window[content].close() )

Is it actually possible to do what I want with javascript, or is it a big no no?


12:51 pm on Nov 19, 2002 (gmt 0)

WebmasterWorld Senior Member korkus2000 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

I believe it will work if you reference through the opener. Try opener.content.close().

Featured Threads

Hot Threads This Week

Hot Threads This Month