title: how to enable and disable a dropdown list based on whether a radio button is checked or not through jstl in jsp
body: <p>In jsp page I have two radio button,if I check a radio button then one dropdown list should be enabled and if I select another radio button then another drop down list should be enabled and first dropdown list should be disabled.If none of the radio buttons are selected then both the drop down should be disbaled. How to do it using or  tags of jstl.I tried in thsi way,but no results</p>
  
  <pre><code>&lt;b&gt;Select Status&lt;/b&gt;
  &lt;p&gt;&lt;input type="radio" name="val" value="Filling" id="Filling"&gt; Filling&lt;/p&gt;
  &lt;p&gt;&lt;input type="radio" name="val" value="Stored" id="stored"&gt; Stored&lt;/p&gt;
  &lt;c:choose&gt;
  &lt;c:when test="${Filling}"&gt;
  Select Reference:
  &lt;select name="ref_logtime" &gt;
  &lt;option value="Select"&gt;Select&lt;/option&gt;
  &lt;c:forEach var="aff" items="${obj.connect()}"&gt;
  &lt;option value="${aff.value}"&gt;${aff.key} ${aff.value}&lt;/option&gt;
  &lt;/c:forEach&gt;
  &lt;/select&gt;
  &lt;/c:when&gt;
  &lt;c:otherwise&gt;
  Select Reference:
  &lt;select name="ref_logtime" &gt;
  &lt;option value="Select"&gt;Select&lt;/option&gt;
  &lt;c:forEach var="aff" items="${obj.connect()}"&gt;
  &lt;option value="${aff.value}"&gt;${aff.key} ${aff.value}&lt;/option&gt;
  &lt;/c:forEach&gt;
  &lt;/select&gt;
  &lt;/c:otherwise&gt;
  &lt;/c:choose&gt;
  </code></pre>
  
  <p><strong>EDIT-</strong>
  How to do it through javascript ,if it can't be done with jstl.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  $(document).ready(function(){
      $('input[name="val"]').click(function() {
         if($('input[name="val"]').is(':checked')) { 
             var radioValue = $("input[name='val']:checked").val();
              if(radioValue == "Filling"){
                 $( "#Fill" ).prop( "disabled", false );
                 $( "#stored" ).prop( "disabled", true );
              } else {
                  $( "#Fill" ).prop( "disabled", true );
                 $( "#stored" ).prop( "disabled", false );
              }
         }
      });
      });
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;jsp:useBean id="obj"  class="ref_Database.Refernce_Database" /&gt;
  
  
  &lt;form method="post" action="All_Mps.jsp"&gt;
  &lt;b&gt;Select Status&lt;/b&gt;
  &lt;p&gt;&lt;input type="radio" name="val" value="Filling" id="Filling"&gt; Filling&lt;/p&gt;
  &lt;p&gt;&lt;input type="radio" name="val" value="Stored" id="stored"&gt; Stored&lt;/p&gt;
  
  
  Select Reference:
  &lt;select name="ref_fill" id="Fill" disabled="disabled" &gt;
  &lt;option value="Select"&gt;Select&lt;/option&gt;
  &lt;c:forEach var="aff" items="${obj.connect()}"&gt;
  &lt;option value="${aff.value}"&gt;${aff.key} ${aff.value}&lt;/option&gt;
  &lt;/c:forEach&gt;
  &lt;/select&gt;
  
  Select Reference:
  &lt;select name="ref_stored" id="stored" disabled="disabled" &gt;
  &lt;option value="Select"&gt;Select&lt;/option&gt;
  &lt;c:forEach var="aff" items="${obj.connect()}"&gt;
  &lt;option value="${aff.value}"&gt;${aff.key} ${aff.value}&lt;/option&gt;
  &lt;/c:forEach&gt;
  &lt;/select&gt;
  
  &lt;br&gt;&lt;br&gt;
  &lt;b&gt;Select Date to be compared&lt;/b&gt;&lt;br&gt;
  &lt;p&gt;
  </code></pre>