title: Bit confused in my script
body: <p>I am learning  mvc with ajax, js, jsp and jQuery.</p>
  
  <p>I have a set of checkboxes like this:</p>
  
  <pre><code>&lt;div class="clinical" id="clinical" name="clinical" value="0"&gt;
    &lt;h6&gt;Clinical Practice/Procedure&lt;/h6&gt;
    &lt;hr&gt;
    &lt;p&gt;&lt;input type="hidden" id="incidentClassifId" name="incidentClassifId" value="0"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;input type="hidden" id="incidentViewIndex" name="incidentViewIndex" value="0"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;input type="hidden" id="appendStockistStatus" value="0"&gt;&lt;/p&gt;
    &lt;!-- &lt;p&gt;&lt;input type="hidden" name="clinical" id="clinical" value="0"&gt;&lt;/p&gt; --&gt;
    &lt;p&gt;&lt;input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalDoc" value="0"&gt;Documentation&lt;/p&gt;
    &lt;p&gt;&lt;input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalMiss" value="0"&gt;Missing Files&lt;/p&gt;
    &lt;p&gt;&lt;input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalPol" value="0" &gt; Policy not available&lt;/p&gt;
    &lt;p&gt;&lt;input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalMed" value="0" &gt; Medical records unavailable&lt;/p&gt;
    &lt;p&gt;&lt;input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalCon" value="0" &gt; Confidentiality&lt;/p&gt;
    &lt;p&gt;&lt;input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalProc" value="0"&gt;Procedures not followed&lt;/p&gt;
    &lt;p&gt;&lt;input type="hidden" name="clinicalVals" id="clinicalVals" value="0"&gt;&lt;/p&gt;
    &lt;p&gt;&lt;input type="checkbox" id="checkBox" onclick="EnableDisableTextBox(this)" &gt; Other (Specify)&lt;/p&gt;
    &lt;p&gt;&lt;input type="text2" id="text" name="incidentClassClinicalVal"  disabled="disabled" style="width: 92%"&gt;&lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>When I click on checkboxes, its default value is changing from 0 to 1 i.e '0' is unchecked where as '1' is checked.<br>
  I am inserting this values in database MySql using MVC architecture and I am showing values to front end like:</p>
  
  <p>This is my front end list values that are inserted in database:</p>
  
  <p><a href="https://i.stack.imgur.com/tzBW8.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tzBW8.png" alt="enter image description here"></a></p>
  
  <p>"IncidentClassificationClinicalValue" column defines the values that are checked<br>
  If I selected only two checkboxes on click that eye button how to check that values with script</p>
  
  <pre><code>var incidentViewIndex = 0;
  $("#incidentTable").on("click", ".view", function(event) {
    event.preventDefault();
    save=1;
    //alert(save+"..view save");
    incidentViewIndex = $(this).closest('tr').index();
    $("#incidentViewIndex").val(incidentViewIndex);
  
    $("#successDiv").hide();
    $("#errorDiv").hide();
  
    var incidentClassifId = $(this).closest('tr').find(".incidentClassifId").val();
    alert("incidentClassifId = "+incidentClassifId);
  
    var clinical = $(this).closest('tr').find(".clinical").val();
    alert("clinical = "+clinical);
    var clinicalDoc = $(this).closest('tr').find(".clinicalDoc").val();
    alert("clinicalDoc = "+clinicalDoc);
    $('.clinicalCheck').prop('checked',true);
  
    $('.nav-tabs a[href="#incidentAdd"]').tab('show');
  });
  </code></pre>
  
  <p>I tried this script but <code>$('.clinicalCheck').prop('checked',true);</code> is checking all checkboxes.</p>