Learing JavaScript : > iam new to javascript and i got a problem
> This is my jsp code with checkboxes
          
      <div class="col-md-2 right2 fon">
		<h6>Clinical Practice/Procedure</h6>
		   <hr>
				<p><input type="hidden" name="clinicalStat" id="clinicalStat" value="0"></p>
			    <p><input type="checkbox" name="clinicalDoc" class="clinicalCheck" id="clinicalDoc" value="0">Documentation</p>
			    <p><input type="checkbox" name="clinicalMiss" class="clinicalCheck" id="clinicalDoc" value="0">Missing Files</p>
				<p><input type="checkbox" name="clinicalPol" class="clinicalCheck" id="clinicalDoc" value="0" > Policy not available</p>
				<p><input type="checkbox" name="clinicalMed" class="clinicalCheck" id="clinicalDoc" value="0" > Medical records unavailable</p>
			    <p><input type="checkbox" name="clinicalCon" class="clinicalCheck" id="clinicalDoc" value="0" > Confidentiality</p>
			    <p><input type="checkbox" name="clinicalProc" class="clinicalCheck" id="clinicalDoc" value="0">Procedures not followed</p>
		        <p><input type="hidden" name="clinicalVals" id="clinicalVals" value="0"></p>
				<p><input type="checkbox" id="checkBox" onclick="EnableDisableTextBox(this)" > Other (Specify)</p>
			    <p><input type="text2" id="text" name="incidentClassClinicalVal"  disabled="disabled" style="width: 92%"></p>
		</div>
 
> I want to get value of selected checkbox with alert and iam storing that value in variable checked1 "var checked1" and again  iwant to pass the "var checked1" value to another variable checkedval "var checkedval" and when iam trying to alert the checkedval it showing me with this error "undefined"
> this is my JavaScript Code

    $(":checkbox").click(function()
        {
    		 //alert(" you checked");
    		 if(this.checked)
    		     {
    			 
    			 var checked1=document.getElementById('clinicalDoc').value;
    			 alert("The value for selected checkbox = "+checked1);
    				 
    			 var checkedval=$("#checked1").val('1');
        		  alert("checkedval="+checkedval);
    		       }
    	});