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

radalert add_close issue

1 Answer 86 Views
Window
This is a migrated thread and some comments may be shown as answers.
debbie f
Top achievements
Rank 1
debbie f asked on 31 Jul 2009, 12:19 PM
I have a page that opens a radwindow to give the user a few choices.  Once the choices have been made & posted back, I set a label with the following text in code-behind:

lblScript.Text = string.Format("<script type='text/javascript'>Sys.Application.add_load(Delete_Clicked('{0}'));</script>", sbMsg.ToString());

Here are the javascript functions:

function Delete_Clicked(msg) {            
            var oWindow = GetRadWindow();
            var oWnd = oWindow.BrowserWindow.radalert(msg, 325, 325, 'Attention');
            oWnd.add_close(Redirect);
}
function Redirect() {
           var oWindow = GetRadWindow();
            oWindow.BrowserWindow.location.href= '<%=redirectUrl %>';
            oWindow.close()
}

Basically, I want the user to see a radalert with some confirmation message.  Once the radalert has been closed, I want the original radwindow to close and redirect the opener page to the appropriate location.  I have tried several variations but cannot get this script to work.  At this point, in IE7 I get a stack overflow and FF does not throw an error.  However, neither browser will close the orginal radwindow or redirect.

Is there anything special to make a radalert work the way I need to?  Any help is appreciated.

1 Answer, 1 is accepted

Sort by
0
Fiko
Telerik team
answered on 04 Aug 2009, 03:05 PM
Hello Debbie

I prepared a demo based on the provided information. Could you please check it attached and let me know whether it fits your requirements? In case that your scenario is different and you need additional assistance, please open a new support thread and send me a runnable project. I will check it and do my best to provide a solution as soon as possible.

I hope this helps.

Regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Window
Asked by
debbie f
Top achievements
Rank 1
Answers by
Fiko
Telerik team
Share this question
or