title: dynamically retrieve textbox values using foreach jquery which itself is dynamically created
body: <p>How to dynamically retrieve values from input text box :</p>
  
  <pre><code>   $(":input").each(function(){alert($(this).text());});
  </code></pre>
  
  <p>Case :</p>
  
  <p>Dynamically column names are taken from xml source &amp; binded in this manner :</p>
  
  <pre><code>&lt;script type="text/javascript" language="javascript"&gt;
      $(document).ready(function(){
  
              $.ajax({
                  type: "GET",
                  url: "GetColumnNames.xml",
                  dataType: "xml",
                  success: function(xml) {
                      var cWidth =  100/(xml.getElementsByTagName("Column")).length;
                      $(xml).find('Column').each(function(){
                          var cId = $(this).find('Id').text();
                          var cName = $(this).find('Name').text();
                          $('&lt;td id='+cId+' width='+cWidth+'&gt;'+cName+'&lt;/td&gt;').appendTo('#page-wrap');
                          $('&lt;label for='+cName+'&gt;'+cName+'&lt;input type="text" name='+cName+'id='+cName+' value="" class="text ui-widget-content ui-corner-all" /&gt;&lt;/label&gt;').appendTo('#moreItems');
                      });
                  }
              });
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>The <code>#moreItems</code> is part of another div which is part of modal popup and i want to access values within that,</p>
  
  <p>So,</p>
  
  <p>after validation i go this way : </p>
  
  <pre><code>   if ( bValid ) {
  
  
                         $(":text").each(function(){
                          alert($(this).text());
                         });
  
  }
  </code></pre>
  
  <p>But still i am not able to access input values.</p>
  
  <p>Note :</p>
  
  <p>It is not similar to :</p>
  
  <p><a href="https://stackoverflow.com/questions/1320088/how-do-i-retrieve-a-textbox-value-using-jquery">How do I retrieve a textbox value using JQuery?</a> ,
  <a href="https://stackoverflow.com/questions/2461343/jquery-retrieve-values-of-dynamically-created-elements">Jquery retrieve values of Dynamically created elements</a> ,
  <a href="https://stackoverflow.com/questions/2730607/how-do-i-retrieve-a-textboxs-title-and-name-using-jquery">how do i retrieve a textbox&#39;s title and name using jquery?</a> ,</p>
  
  <p>Looking for your help ..</p>
  
  <p>Thanks.</p>