I have a checkbox defined as
<telerik:RadButton ID="checkbox1" runat="server" Text="testing" ButtonType ="ToggleButton" ToggleType="CheckBox" OnClientClicked="checkbox1_ClientClicked"></telerik:RadButton>
What I want to do in the ClientClicked event is only check the box (and uncheck a different checkbox) when the user selects OK. Everything else seems to work fine but even though the last thing I do in the "ok" case is .set_checked(false) the box remains checked. Here is the javascript:
function checkbox1_ClientClicked(sender, eventArgs) {
var checkbox1 = $find('<%=checkbox1.ClientID%>');
function CallbackFn(arg) {
if (arg) {
var checkbox1 = $find('<%=checkbox1.ClientID%>'); // I know I probably don't need this, just being safe
var checkbox2 = $find('<%=checkbox2.ClientID%>');
checkbox1.set_checked(true);
checkbox2.set_checked(false);
}
else {
checkbox1.set_checked(false);
}
}
if (checkbox1.get_checked()) {
return radconfirm("warning text", CallbackFn, 330, 150, null, "title");
}
}
I've also tried the ClientCheckedChanged and ClientCheckedChanging events with similar results. What obvious, basic thing am I missing? 8^)
<telerik:RadButton ID="checkbox1" runat="server" Text="testing" ButtonType ="ToggleButton" ToggleType="CheckBox" OnClientClicked="checkbox1_ClientClicked"></telerik:RadButton>
What I want to do in the ClientClicked event is only check the box (and uncheck a different checkbox) when the user selects OK. Everything else seems to work fine but even though the last thing I do in the "ok" case is .set_checked(false) the box remains checked. Here is the javascript:
function checkbox1_ClientClicked(sender, eventArgs) {
var checkbox1 = $find('<%=checkbox1.ClientID%>');
function CallbackFn(arg) {
if (arg) {
var checkbox1 = $find('<%=checkbox1.ClientID%>'); // I know I probably don't need this, just being safe
var checkbox2 = $find('<%=checkbox2.ClientID%>');
checkbox1.set_checked(true);
checkbox2.set_checked(false);
}
else {
checkbox1.set_checked(false);
}
}
if (checkbox1.get_checked()) {
return radconfirm("warning text", CallbackFn, 330, 150, null, "title");
}
}
I've also tried the ClientCheckedChanged and ClientCheckedChanging events with similar results. What obvious, basic thing am I missing? 8^)