faqts : Computers : Programming : Languages : JavaScript

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 1 people (0%) answered Yes
Recently 0 of 1 people (0%) answered Yes

Entry

How do you check if someone closes the parent window?

Apr 8th, 2008 18:23
ha mo, Dave Clark, bryan persad,


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Bryan,
     The following IF structure demonstrates teh possibilities:
if (top.opener)
{
    if (top.opener.closed)
    {
        // there is an opener but it is now closed
    }
    else
    {
        // there is an opener and it is still open
    }
}
else
{
    // there is no opener associated with this window
}
Take care,
Dave Clark
www.DaveClarkConsulting.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.businessian.com
http://www.computerstan.com
http://www.financestan.com
http://www.healthstan.com
http://www.internetstan.com
http://www.moneyenews.com
http://www.technologystan.com
http://www.zobab.com
http://www.healthinhealth.com