title: jquery check box some ideas
body: <p>im trying to make a checkbox that disable the computation in my query here is my </p>
  
  <p>form code: </p>
  
  <pre><code>&lt;input type="hidden" name="stud_no[]" value="&lt;?php echo
  $row['student_no'];?&gt;"&gt; &lt;input type="text" name="prelim[]"
  value="&lt;?php echo $row['prelim_pts']?&gt;" id="prelim_&lt;?php echo
  $row['student_no'];?&gt;" class="txtprelim" &gt;&lt;/td&gt; &lt;td&gt;&lt;input
  type="text" name="midterm[]" value="&lt;?php echo
  $row['midterm_pts']?&gt;" id="midterm_&lt;?php echo $row['student_no'];?&gt;"
  class="txtmidterm" &gt;&lt;/td&gt; &lt;td&gt; &lt;input type="text" name="final[]"
  value="&lt;?php echo $row['finals_pts']?&gt;" id="final_&lt;?php echo
  $row['student_no'];?&gt;" class="txtfinal" &gt;&lt;/td&gt; &lt;td&gt; &lt;input
  type="text" name="average[]" id="average_&lt;?php echo
  $row['student_no']; ?&gt;" value="&lt;?php echo $row['average_pts']; ?&gt;"
  readonly="readonly"&gt; &lt;/td&gt; &lt;td&gt;&lt;input type="checkbox"
  name="disable[]" value="&lt;?php echo $row['disable_comp'];?&gt;"
  class="dis"&gt; &lt;/td&gt;
  </code></pre>
  
  <p>here now is my jquery code:</p>
  
  <pre><code>$(document).ready(function(){
                  p="";       m="";       f="";
  
  
  
  
                  $(".txtprelim").keyup(function(){           var id = $(this).attr("id").replace("prelim_","");
                  p = $("#prelim_" + id).val();
                  m = $("#midterm_" + id).val();
                  f = $("#final_" + id).val();            Compute( p,m,f, id);            //alert($(".txtprelim").val());
                  });
              $(".txtmidterm").keyup(function(){
                  var id=$(this).attr("id").replace("midterm_","");
                      p = $("#prelim_" + id).val();
                      m = $("#midterm_" + id).val();
                      f = $("#final_" + id).val();
  
                  Compute( p, m, f,id);           //alert($(".txtmidterm").val());
              });
              $(".txtfinal").keyup(function(){
                      var id=$(this).attr("id").replace("final_","");
                          p = $("#prelim_" + id).val();
                          m = $("#midterm_" + id).val();
                          f = $("#final_" + id).val();
  
                      Compute( p, m, f, id);
  
                      //alert($(".txtfinal").val());
  
                      //alert($("f").val());      }); 
  
          function Compute(p , m , f , studno){       //  alert("p="+p+" m="+m+"
  f="+f);             var average="";
               average = parseFloat(p * 0.3) + parseFloat(m * 0.3 )+ parseFloat(f * 0.4);             $("#average_" +
  studno).val(average.toFixed());
  
                  //alert(average);       }
  
  
  
                      $("input[type='dis']").change ( function(){
                          var val =$(this).val();
                          if($(this).is(':checked'))
                          {
                              alert($(this).val());
                          }
  
                      });
  
  
  
  
  
  
  
                  });
  </code></pre>