validate dynamically added textbox

Posted by Hulk on Stack Overflow See other posts from Stack Overflow or by Hulk
Published on 2010-04-21T10:24:14Z Indexed on 2010/04/21 10:33 UTC
Read the original article Hit count: 340

In the below code how to validate for null values for only the dynamically added text box i.e,r_score1,r_score2.........

  <script>
   function validate()
   {
      //How to validate the r_Score.. textfields
   }
  $(document).ready(function() {
   for(var i=0;i< sen.length;i++)
   {
     row += '<input type="text" name="r_score'+i+'" id="r_score'+r_count+'" size="8" />';
    }
   $('#details').append(row);
   });
   </script>
   <div id="details"><input type="text" name="score' id="score" size="8" /></div>
  <input type="button" value="Save" id="print" onclick="javascript:validate();" />

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-selectors