Retrieve child window reference after refresh

后端 未结 5 1668
小鲜肉
小鲜肉 2021-01-17 18:32

I have an HTML5 offline app (i.e. there\'s no server-side component/code).

It basically has two windows (parent and child). However, in some instan

5条回答
  •  长情又很酷
    2021-01-17 19:20

    Can you call something on your opener that tells it to reload and reopen the popup to a page?

    e.g.

    //in popup
    window.opener.doReload('popup_page_name.html');
    window.close();
    
    //in opener
    function doReload(popupURL){
      setSomeFormField(popupURL);
      someForm.submit();
    }
    

    then in your server-side code, if you had the popup set, add the code to re-launch it.

提交回复
热议问题