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.
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.