| |

VerySource

 Forgot password?
 Register
Search
View: 5|Reply: 0

On how to determine whether window.parent.opener is closed! !! !! !! !!

[Copy link]

2

Threads

3

Posts

4

Credits

Newbie

Rank: 1

Credits
4

 China

Post time: 2020-3-19 23:00:02
| Show all posts |Read mode
function shutwin ()
{
     var wp = window.parent.opener;
        if (wp! = null&&typeof (wp)! = "undefined"&&! wp.closed)
        {
            if (wp.document.forms [0] .txtRefreshParent! = null)
            {
                wp.document.forms [0] .txtRefreshParent.value = "Refresh";
            }
            else
            {
               if (wp.document.forms [0] .ctl00_MainPlaceHolder_txtRefreshParent! = null)
               {
                   wp.document.forms [0] .ctl00_MainPlaceHolder_txtRefreshParent.value = "Refresh";
               }
            }
            wp.document.forms [0] .submit ();
        }
    window.parent.close ();
}
In fact wp is closed, but why is wp.closed equal to true, and typeof (wp) = "object", why? ? ?
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list