How to check a checkbox when an item i a combobox is selected?

I want so when the item with value = 1 is selected in the combobox, the checkbox is checked, and if it is any of the others it gets unchecked.

Right now it just unchecks the checkbox.
<script type="text/javascript">
    function OnClientSelectedIndexChangedHandler(item)
    {
        if( item.Value == "1")
        {
            (document.getElementById("CheckBox_send_email")).checked = true;
        }
        else
        {
            (document.getElementById("CheckBox_send_email")).checked = false;
        }                
    } 
</script>
 
 
<telerik:RadComboBox ID="ComboBox_contract_status" runat="server" OnSelectedIndexChanged="ComboBox_contract_status_SelectedIndexChanged"
    Skin="Vista" Width="150px" OnClientSelectedIndexChanged="OnClientSelectedIndexChangedHandler">
    <Items>
        <telerik:RadComboBoxItem runat="server" Text="Ingen Kontrakt." Value="0" />
        <telerik:RadComboBoxItem runat="server" Text="Kontrakt skal sendes." Value="1" />
        <telerik:RadComboBoxItem runat="server" Text="Kontrakt sendt." Value="2" />
        <telerik:RadComboBoxItem runat="server" Text="Kontrakt Underskrevet." Value="3" />
    </Items>
    <CollapseAnimation Duration="200" Type="OutQuint" />
</telerik:RadComboBox>
 
 
<asp:CheckBox ID="CheckBox_send_email" runat="server" Text="Send Email" TextAlign="Left" />

Open in new window

mSchmidtAsked:
Who is Participating?
 
daveamourCommented:
Isn't what you described just a radio button rather than a checkbox?
0
 
mSchmidtAuthor Commented:
thx for the link, helped me out.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.