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