Hi,
I'm using RadConfirm and initiating it from a C# method. The confirm window pops up just fine, but in my JavaScript is always returning false. Here is an example of what I have:
C#
protected
void
txtUserName_DupValidator_ServerValidate(
object
source, ServerValidateEventArgs args)
{
if
(hfUserName.Value != txtUserName.TextWithPromptAndLiterals)
{
if
(!(Controller).IsUsernameUnique(txtUserName.TextWithPromptAndLiterals))
{
args.IsValid =
false
;
rwmDialogs.RadConfirm(
"This is an existing user, do you want to edit the existing user or cancel?"
,
"confirmCallBackFn"
, 300, 250,
null
,
"Verify User"
);
}
}
}
JavaScript
function
confirmCallBackFn(arg) {
//radalert("<strong>radconfirm</strong> returned the following result: <h3 style='color: #ff0000;'>" + arg + "</h3>", 350, 250, "Result");
if
(arg =
"false"
) {
newWindow = openAdminPage(
"../../../Users"
);
return
false
;
}
else
{
PageMethods.DisplayUser(document.getElementById(
"<%=txtUserName%>"
.value))
}
}
Markup
<
telerik:RadWindowManager
ID
=
"rwmDialogs"
runat
=
"server"
RenderMode
=
"Lightweight"
EnableShadow
=
"true"
></
telerik:RadWindowManager
>