[JS] window.open & window.close??

They have: 9 posts

Joined: Jun 2000

Hi, I open a new window (popup) in index.htm, then index.htm redirect to new.htm. I try to close the popup in new.htm, but it doesn't know that window.

I want to know if it is possible to close a window opened with "window.open" command from an external window.

Do you understand what I mean?

Thanks for help.

Gauthier

Vincent Puglia's picture

They have: 634 posts

Joined: Dec 1999

Hi,

var newWin = window.open("new.htm"....)

...when focus is brought back to the first window....

newWin.close();

or within the newWin itself:

self.close();

Vinny

Where the world once stood
the blades of grass cut me still

They have: 9 posts

Joined: Jun 2000

It is a little bit more complicated...

I just want to know if it is possible to close a popup from the window A which was opened with the window B.

Do U see?

Thanks...

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.