how to refresh parent window by using Javascript in .cs
<p>How to refresh the parent window while closing the popup window(child window).</p>

<p>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.</p>

<p>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.</p>

<p>The below code for call the javascript function in .cs class.</p>

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

<p>The above code RefreshPage() is the javascript function to refresh the page</p>

<p>i.e.</p>

<pre><code>function RefreshPage() { window.document.forms[0].submit(); }
</code></pre>

<p>Please help me i tried with different scenarios but no output.</p>

<p>instead of RefreshPage() i used different functions</p>

<p>like reload(),</p>

<p>window.opener.forms[0].submit(),</p>

<p>likewise but still no output anyone knows please help me.</p>
