Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do I close or show a pop-up window automatically?

Status
Not open for further replies.

miahmiah

Programmer
Oct 1, 2002
9
US
I tried using <body onBlur=&quot;window.close();&quot;> in a pop-up window created by window.open() but but the onBlur does not always activate immediately - can I use onFocus in the parent window? How do I close a window that is not the window that the window.close command is coming from? window.close(&quot;popupname&quot;) does not seem to work.

Anyone know a solution? That would be super!
 
OOPS nevermind, figured it out... ;)

I just had to make the window an object:
popupwin = window.open(...);

and also:
onFocus = &quot;popwin.close()&quot;;

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top