This is what I see while debugging... The first field on the page which was disabled on the server is rendered as disabled. So far so good. However, when I look at this fields' disabled attribute it is showing as false. So my jQuery is finding this field as the first enabled input and trying to set focus on it. So it would seem my jQuery is working just fine. Somehow the value of the attribute is not getting set on the client properly even though it displays as disabled.
I'm afraid maybe I'm just going crazy. Please tell me someone out there has seen something like this before.
Here is my code.
<tr style="padding-left: 10px">
<asp:panel id="pnlModeledIRPMInput" runat="server">
<input id="PropertyModeledIRPM" style="TEXT-ALIGN: right; color: Gray" enableviewstate="true" maxlength="5" size="12" name="PropertyModeledIRPM" tabindex="-1" runat="server"/></font>
<asp:panel id="Series2InputSection" runat="server">
<input id="PropertyOverrideIRPM" onblur="CheckDecimal(this);" style="TEXT-ALIGN: right"
onfocus="this.select()" enableviewstate="true" maxlength="5" size="12" name="PropertyOverrideIRPM" runat="server"/></font>
vb code behind
If (<some condition>) Then
PropertyOverrideIRPM.Disabled = True
I also added this for a sanity check:
var firstInput = document.getElementById("PropertyModeledIRPM").disabled;
in order to check the value. Still showing as false.
Any help would be appreciated. Thanks!!