I have an ASP dropdown and a button. I need the button to be disabled when the dropdown's selected value is the first index, and enabled when any other value is selected.
Here is my code, however, it is not functioning as expected:
function checkSelect()
{
if (document.getElementById('ddlSte').value == 'Select One')
document.getElementById('StGoBtn').disabled = true;
else
document.getElementById('StGoBtn').disabled = false;
}
Controls:
<asp:DropDownList ID="ddlSte" runat="server" Width="162px" onchange='checkSelect(this);'>
</asp:DropDownList>
<asp:Button ID="StGoBtn" CssClass="buttnStyle" runat="server" Text="GO>>"></asp:Button>