ascx control file which calls an aspx page, Tried all combinations of window.opener to reload the ascx page.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gglobus
    New Member
    • Jul 2008
    • 1

    ascx control file which calls an aspx page, Tried all combinations of window.opener to reload the ascx page.

    ascx control file which calls an aspx page, Tried all combinations of window.opener to reload the ascx page. It has no form on it so I even tried using form1 in the name to see if I could get it to reload. I even put a button on the page and that does an onClientClick that works on the button in the page. However when I try to invoke it with see the code below it will not reload from the aspx page(the child page).

    function refreshAndClose 1() {
    opener.location .reload();
    window.close();
    }
    async function refreshAndClose () {
    function doit() {
    if (window.opener && !window.opener. closed) {
    window.opener.l ocation.reload( );
    }
    }
    window.close();
    setTimeout(doit , 100);
    }
    function surrogateUpDate Func() {
    alert('We are inside the aspx function');
    window.opener.d ocument.Form1.g etElementById(' btnRefresh').cl ick();
    //function reloadwin() {
    // window.open('', '_self', '');
    // self.close();
    // }
    //setTimeout(relo adwin, 1000);
    self.close();
    //alert('We are about to attempt unload of opener!');
    //window.opener.r eload();
    //window.opener.d ocument.locatio n.reload();
    }

    One thing which might be at issue here is the progarmmer who wrote this was using a lot of what he called modal stuff with async to get things to work in Chrome which were working ifine in the old IE11.
Working...