I am having one checkbox and one input text in a row .I want when a user checks the checkbox to diable the text and clear its value.
I tried this one but nothing: What is wrong?
HTML:
  <span style="width: 200px;font-size: 80%;"><input id="chkSendSummary" type="checkbox" name="ctl03$ctl00$ctl00$chkSendSummary" onclick="checkSendSummaryLetter();"></span>    
<input name="ctl03$ctl00$ctl00$txtSendSummary" type="text" id="txtSendSummary" class="NormalTextBox" style="width: 170px;">                 
  var chkSendSummaryLetter=document.getElementById('chkSendSummary');
    var txtSendSummaryLetter=document.getElementById('txtSendSummary');
            if (chkSendSummaryLetter.checked) {
                txtSendSummaryLetter.enabled = true;
            } else { 
                txtSendSummaryLetter.value = "";
                txtSendSummaryLetter.enabled = false;
            }
 
     
    