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

close and reload

1 Answer 115 Views
Window
This is a migrated thread and some comments may be shown as answers.
Jorge
Top achievements
Rank 1
Jorge asked on 07 Nov 2008, 09:06 PM
Hi, I'm using radwindows to show message in my pages. I found a code to close windows and after redirect to other page, I want this but I need close the windows with a message and refresh the parent page. I use this code.

VB code to open rawindows_message.aspx
System.Web.UI.ScriptManager.RegisterClientScriptBlock(UpdatePanel1, Me.GetType(), "SCRIPT""openRadWindow('rawindows_message.aspx')"True

click to show message, close and reload the parent page.
 ScriptManager.RegisterStartupScript(MeMe.GetType(), "alert""<script type='text/javascript'>Sys.Application.add_load(function(){radalert('you will be redirected to Default.aspx');})</script>"False
  aspx code:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"
      <AlertTemplate>  
        <div class="windowpopup radalert">            
            <div class="dialogtext">  
            {1}               
            </div>  
              
            <div>  
                <a  onclick="$find('{0}').close(); window.location.href = 'Default.aspx';"  
                class="radwindowbutton" href="javascript:void(0);">  
                    <span class="outerspan">  
                        <span class="innerspan">##LOC[OK]##</span>  
                    </span>  
                </a>                  
            </div>  
        </div>  
</AlertTemplate>  
    </telerik:RadWindowManager> 

I need close the rawindows_messagea.aspx and reload the parent page (default.aspx)

1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 10 Nov 2008, 02:47 PM
Hi Jorge,

I suggest to examine this KB article which demonstrates a possible approach for your problem. I also recommend to replace the reload() method in the RefreshParentPage function with the following code:

function RefreshParentPage()        
{        
 GetRadWindow().BrowserWindow.location.href = GetRadWindow().BrowserWindow.location.href     
}     
 



Greetings,
Svetlina
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Jorge
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Share this question
or