How to refresh the parent window from child window close in asp.net
<p>How to refresh the parent window from child window close in asp.net(.cs page).We are using </p>

<pre><code>page.ClientScript.RegisterStartupScript(this.GetType(), "PopupSave", "&lt;script&gt; JavaScript(`successfully Saved`); window.close();window.top.opener.RefreshPage();&lt;/script&gt;");
</code></pre>

<p>for refresh the parent page from child window close.</p>

<p>here <code>RefreshPage()</code> is a custom function</p>

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

<p>it is working fine in IE but not in Mozilla Firefox and Google chrome.
please help me it is very urgent requirement for me.</p>

<hr>

<p>Again it is not working with your solution also. My project structure is entirely different then what you explained above. We are calling the java script functions in code behind by using <code>page.ClientScript.RegisterStartupScript()</code>.Here we are calling the different java script functions separated by semicolon(<code>;</code>).see below</p>

<pre><code>page.ClientScript.RegisterStartupScript(this.GetType(), "PopupSave", &lt;script&gt;javascript:alert('Successfully Saved'); window.close();window.top.opener.RefreshPage();&lt;/script&gt;");
</code></pre>

<p>here RefreshPage() is the user defined java script function i.e.</p>

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

<p>It is working fine in <em>IE</em> (internet explorer) but not working in <em>Mozilla Firefox</em> and <em>Google Chrome</em>.</p>

<p>In the <em>Mozilla Firefox</em> 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.</p>

<p>If i put debugger in <code>RefreshPage()</code> function in <em>IE</em> it is firing but not in <em>Firefox</em>. Please help me.</p>
