Disabling Controls
<p>I'm trying to disable some controls on my Aspx page but can't get it working. I've tried both Javascript and JQuery so I know I must be doing something simple wrong.</p>

<p>Here's what I have atm and I know that it's definitely entering both functions when I want them to because I've stuck in alerts to tell me so. However the controls remain enabled always!</p>

<pre><code>&lt;script language="javascript" type="text/javascript"&gt;

function fun1(){
var input = $('#txtDocs');
input.removeAttr('disabled');
}

function fun2() {
var input = $('#txtDocs');
input.attr('disabled', 'disabled');
}
</code></pre>

<p>And the control itself;</p>

<pre><code>&lt;p&gt;
&lt;asp:TextBox ID="txtDocs" runat="server"  Width="218px" 
      Height="75px" TextMode="MultiLine" MaxLength="40"/&gt;
&lt;/p&gt; 
</code></pre>

<p>I've also tried swapping out the code in both functions for various versions of the following;</p>

<pre><code>document.getElementById("txtDocs").enabled = true;
document.getElementById("txtDocs").attributes.enabled = true;
document.getElementById("txtDocs").disabled = false;
</code></pre>

<p>No good though. What am I doing wrong?</p>

<p><strong>UPDATE</strong></p>

<p>current code;</p>

<pre><code>function fun1(){
alert("1 enable");
$('#txtDocs').removeAttr('disabled');
alert("2 enable");
}

function fun2() {
alert("1 disable");
$('#txtDocs').prop('disabled', true);
alert("2 disable");
}

&lt;asp:TextBox ID="txtDocs" runat="server"  Width="218px" ClientIDMode="Static"
      Height="75px" TextMode="MultiLine" MaxLength="40"/&gt;
</code></pre>

<p>Still no good :/ I'm only seeing <code>alert("1 disable")</code>, <code>alert("1 enable")</code> and <code>alert("2 enable")</code> so not getting through fun2...</p>

<p><strong>NOTE</strong></p>

<p>Debugged into my code and just noticed that during run time my Textbox is actually a Textarea. Any significance? Also it's ID will have the usual "ctl00_MainContentPlaceHolder_" tagged onto the start.</p>
