title: asp.net controls with javascript
body: <p>I know this is probably a simple fix but I can't seem to figure out the issue here...</p>
  
  <p>I am trying to disable withinthepast text box when RadioButton1 is clicked.</p>
  
  <pre><code>&lt;asp:RadioButton ID="RadioButton1" runat="server" Checked="True" GroupName="DateTimeQuery" OnClick="javascript:TimeRangeClickEvent()"/&gt;
  &lt;asp:TextBox ID="withinthepast" runat="server" Text="1"&gt;&lt;/asp:TextBox&gt;
  
  &lt;script&gt;
          function TimeRangeClickEvent()
          {
              var radio1 = document.getElementById('&lt;%=RadioButton1.ClientID%&gt;').checked;                
  
              if (radio1 == true)
              {
                  var within = document.getElementById('&lt;%=withinthepast.ClientID%&gt;').enabled = false;
              }
          }
      &lt;/script&gt;
  </code></pre>
  
  <p>Any advice?     </p>