Hi there, I was wondering if there is a way to prevent users from clicking the red x in a RadConfirm dialog. If not is there some way to know when they do click the red x?
1 Answer, 1 is accepted
0
Georgi Tunev
Telerik team
answered on 03 Oct 2008, 02:42 PM
Hi Rory,
We are familiar with this issue and we will fix it for one of the following updates. For now you can use the following workaround:
<form id="form1"runat="server">
<script type="text/javascript">
var confirmClosed = false;
function confirmWin()
{
var wnd = radconfirm("Sure?", callbackFn);
//Reset the flag to its default value
confirmClosed = false;
//Add on close handler to the window
wnd.add_close(function()
{
//This function is called AFTER the callback function
//So, if the cancel or ok buttons were clicked, the callbackFn will set confirmClosed = true;
if (!confirmClosed)
{
alert("THE USER PRESSED THE [X] BUTTON");
}
});
}
function callbackFn(arg)
{
alert("Result is: " + arg);
//Set a flag that will indicate that this callback function was invoked