Hi. In many parts of my application when an item gets deleted I show a radalert to confirm to the user if the item has been deleted successfully or not. This has worked for me well until I needed to attach a radconfirm before the radalert. The js error that appears is "object doesn't support this property or method". This is all happening from a radtoolbar so I've followed the article here to get the radconfirm working. A regular js alert works okay.
This code has worked for me in the past.
Thanks
Daniel
This code has worked for me in the past.
if
(rows >= 1)
{
script = @
"var oWnd = radalert('The item was deleted successfully. Click OK to redirect to the Q&A home page.', 330, 210); var browserWin = oWnd.BrowserWindow; var fn = new browserWin.Function('oWnd', 'window.location.href = "
"/teams/hr/qa/"
"'); oWnd.add_close(fn);"
;
//script = @"alert('The item was deleted successfully. Click OK to redirect to the Q&A home page.'); window.location.href = '/teams/hr/qa/';";
}
else
{
script = @
"var oWnd = radalert('An error occurred deleting the item. Please contact the ServiceDesk on x4555. Click OK to redirect to the Q&A home page.', 330, 210); var browserWin = oWnd.BrowserWindow; var fn = new browserWin.Function('oWnd', 'window.location.href = "
"/teams/hr/qa/"
"'); oWnd.add_close(fn);"
;
//script = @"alert('An error occurred deleting the item. Please contact the ServiceDesk on x4555. Click OK to redirect to the Q&A home page.');";
}
myAjaxManager.ResponseScripts.Add(script);
Thanks
Daniel