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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Referencing from a pop-up and closing?

Status
Not open for further replies.

danima

Programmer
Jan 9, 2002
134
CA
Hi folks:

I know how to add a "close window" button to a pop-up window, however, I get stumped when I want the window to automatically close when the person links from the pop-up to a new page (target=new).

I'm sure it's a simple onClick(something), but I can't figure it out.

Any help would be very much appreciated!

cheers,
 
Here's what we use:
<A HREF=&quot; TARGET=&quot;new&quot; onClick=&quot;setTimeout('window.close()',1000);&quot;>Click here</A>

We were finding the onclick fires before the link, so the timeout gives the link time to process before the window closes. Hope this helps,
Jessica
 
Thanks....worked perfectly! Your help was much appreciated.

dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top