window.opener is undefined on Internet Explorer

前端 未结 2 1195
野趣味
野趣味 2020-12-06 14:14

When I am trying to access an element of my Parent window from a Pop-up window, I am getting window.opener as undefined.

var opener = window.ope         


        
2条回答
  •  春和景丽
    2020-12-06 14:52

    I had the same problem and it was due to Internet Explorer Security Options, in particular because my popup was going to an External website (Internet area) and the parent was an internal page (Intranet area). The "Protected Mode" was only activated for the "Internet". I activated it for the "Local intranet" and now it works.

    To find this option in IE:

    • Go to Internet Options
    • Security tab
    • Click on "Internet" or "Local intranet" icon
    • Check or uncheck the option "Enable Protected Mode"
    • Restart IE

提交回复
热议问题