locked
How to refrsh the parent page from child page RRS feed

  • Question

  • Hi,

    How to refresh the parent window while closing the popup window(child window).

    We are calling the java script functions in code behind to refresh the parent window by using page.ClientScript.RegisterStartupScript().But t is working fine in IE(internet explorer) but not working in Mozilla Firefox and Google Chrome.

    In the Mozilla Firefox the pop up value is saving in the database but it is not updating into the parent page.If i did refresh manually the value is getting updating into the parent page. If i put debugger in RefreshPage()(javascript function) function in IE it is firing but not in Firefox.

    The below code for call the javascript function in .cs class.

       page.ClientScript.RegisterStartupScript(this.GetType(), "PopupSave", "<script>javascript:alert('" + dsMessage.Tables[0].Rows[0]["ErrorMessage"].ToString() + "');window.open('','_self','');window.close();window.document.forms[0].submit();</script>");
    

    The above code RefreshPage() is the javascript function to refresh the page

    i.e.

    function RefreshPage() { window.document.forms[0].submit(); } 

    Please help me i tried with different scenarios but no output.

    instead of RefreshPage() i used different functions

    like reload(),

    window.opener.forms[0].submit(),

    likewise but still no output anyone knows please help me.

     

     


    Thanks&Regards, Nagamuneendra Reddy
    Wednesday, January 25, 2012 7:57 AM