Here's some code for that...
Basically, if you have opened a window and assigned it to a variable,
you can check the window's closed property,
as in: oSmallWin.closed
<script language=3D"JavaScript" type=3D"text/javascript">
<!--
var oSmallWin =3D null;
var bHasBeenOpenedOnce =3D false;
function openWin(){
if(bHasBeenOpenedOnce){
if(!oSmallWin.closed){
oSmallWin.focus();
}
else{
oSmallWin =3D
window.open("http://www.google.com", "smallWin",
"left=3D100,top=3D100,width=3D200,height=3D200");
}
}=09
else{
oSmallWin =3D window.open("http://www.google.com",
"smallWin", "left=3D100,top=3D100,width=3D200,height=3D200");
bHasBeenOpenedOnce =3D true;
}=09
}
//-->
</script>=09
=09
/Robert
-----Ursprungligt meddelande-----
Fr=E5n: markie [mailto:markie@t...]
Skickat: den 20 september 2002 12:32
Till: Beginning JavaScript
=C4mne: [beginning_javascript] opening and closing window
Hi,
I want to open and close a popup from one window, with two buttons. One
button opens it and the other buttons closes it.
Is that possible?
greetz
markie
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
leave-beginning_javascript-1179097H@p...
-----Ursprungligt meddelande-----
Fr=E5n: ritagreenberg@f... [mailto:ritagreenberg@f...]
Skickat: den 20 september 2002 19:38
Till: JavaScript HowTo
=C4mne: [javascript_howto] Any Way To See if Specific Window Open
Hi.
Using JScript, is there a way to see if a specific window is open (an
asp
page)?
TIA.
Rita
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20