This is a migrated thread and some comments may be shown as answers.

Refresh parent window not working on window close

1 Answer 261 Views
Window
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 09 Sep 2011, 10:53 AM
I am opening a radwindow, a form is submitted in the radwindow, user closes the radwindow and then the parent should refresh but it doesn't seem to be refreshing the page or data for some reason...

<script type="text/javascript">
        function openRateOLWin(OLID) {
            var oWnd = radopen("/ContentZone/rateol.aspx?OLID=" + OLID, "RadWindow1");
            oWnd.setSize(640, 340);
        }


        function RefreshParentPage()//function in parent page
        {
            document.location.href = document.location.href;
        } 
    </script>

<telerik:radwindowmanager id="RadWindowManager1" showcontentduringload="false" visiblestatusbar="false"
        reloadonshow="true" runat="server" skin="Vista" enableshadow="true">
        <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" Behaviors="Move, Resize, Close" Skin="Vista" OnClientClose="RefreshParentPage"></telerik:RadWindow>
            
        </Windows>
    </telerik:radwindowmanager>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 12 Sep 2011, 12:07 PM
Hello Simon,

You can hook the OnClientColose to the RadWindow and refresh the page using document.location.reload().
Try the following Javascript.
JS:
<script type="text/javascript">
function RefreshParentPage()//function in parent page
{
  document.location.reload();
}
function closeWin() //function in content page
{
  var oWnd = GetRadWindow();
  oWnd.close();
  top.location.href = top.location.href;
}
</script>
This function should be placed in the parent page - where your RadWindow / RadWindowManager is. This function should also be hooked to the RadWindow with the OnClientClose property.

Thanks,
Shinu.
Tags
Window
Asked by
Simon
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or