window.opener alternatives

前端 未结 5 1845
生来不讨喜
生来不讨喜 2020-11-30 03:39

I am opening a modal popup window. Then I access a parent window textbox and other attributes using window.opener. It is working fine in firefox but not in IE8.

5条回答
  •  青春惊慌失措
    2020-11-30 03:56

    Disable Internet Explorer's "Protected Mode", which prevents access to this object.

    The steps for this are:

    1. Press Alt+T to show the Tools menu
    2. Click "Internet options"
    3. Select the "Security" tab
    4. Make sure zone selected contains your site. For an intranet site it would typically be "Local intranet" zone.
    5. Untick "Enable Protected Mode"
    6. Close all IE tabs and windows and re-open.

    Now you should be able to access the window.opener object.

提交回复
热议问题