How do I disable or enable 2nd dropdownlist in aspx based on selected choice of the 1st dropdownlist box
<p>I am having a problem with disabling DropDownList based on the chice of 1st DropDownList, there is no post back occuring, and it is a template based web app here is the current code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
   $(function() {  var dropDownList1 = $('#&lt;%= ddlUserType.ClientID %&gt;');
var dropDownList2 = $('#&lt;%= ddlMember.ClientID %&gt;');            dropDownList1.change(function(e)  {
if ( jQuery("#ddlUserType").val() != "ETOC")                           dropDownList2.removeAttr('disabled');                                     e.preventDefault();
      else 
      dropDownList2.removeAttr('enabled');                                    e.preventDefault(); }
     } );
      &lt;/script&gt;
</code></pre>

<p>what is happening now is page is blank and if I remove the above code everything shows, where I am going wrong.</p>

<p>here is the plain  and final javascript code which worked:</p>

<pre><code>&lt;script language="javascript"&gt;  
function CheckDropDownState(lstbox)
 { 
if (lstbox.selectedIndex == 3) {  document.forms[0].ddlMember.disabled = 1; }
else { document.forms[0].ddlMember.disabled = 0; } 
} 
&lt;/script&gt;
</code></pre>

<p>and thew .aspx code:</p>

<pre><code>&lt;asp:dropdownlist id="ddlUserType" runat="server" onclick="CheckDropDownState(this);"&gt;&lt;/asp:dropdownlist&gt;
</code></pre>

<p>Once again appreciate the help guys.</p>
