How to reload Main Page from within an iFrame

Viewed 94273

Within my scenario, I have a button within an iframe section of my page that performs some database processing.

What I need is a means of performing a page refresh of the main page, when this button within the iframe is pressed.

I am seeking some JavaScript code that I can trigger within the iframe, that will reload the main window holding the iframe.

7 Answers
window.top.location.reload();
window.parent.location.reload();

If you code Page with aspx C# you can view code:

ClientScript.RegisterStartupScript(this.GetType(), "LoadParent", "<script language=javascript>window.parent.location.reload();</script>");
Related