title: Find checkbox values from Dynamically generated Divs in php using javascript
body: <p>How to find checkbox values from Dynamically generated Divs in php using javascript?</p>
  
  <p>Here is my code,</p>
  
  <pre><code>echo "&lt;input type='text' name='chkID' id='chkID'&gt;
     &lt;div id='mainDiv'&gt;";
  
   while($rowset = mysql_fetch_array($result))
    {
      echo "&lt;div style='float:left; width=10px; border:solid 1px;'&gt;
      &lt;input type='checkbox' value =".$rowset[0]."&gt;".$rowset[0]."&lt;/div&gt;
     &lt;div style='float:left; width=200px; border:solid 1px;'&gt;".$rowset[1].''.$rowset[2]."
     &lt;/div&gt;&lt;/br&gt;&lt;/br&gt;";
    }
  
   echo '&lt;/div&gt;';
  </code></pre>
  
  <p>I want to display the values of checkboxes selected which would be like (1,2,3) in the <code>chkID</code> textbox... I want it to be done using javascript...</p>