title: checking dynamically created textboxes for values
body: <p>I am creating a form for inserting data which technologies are being used by which customers.</p>
  
  <p>I get data of customer's ID and name and select a customer in an drop-down list, and i get data from technologies id and description and display description in a table + it creates a textbox <code>(ID='box-". $row1['ID_T']."')</code> for every technology entry in a DB. </p>
  
  <p>So now i would like to check this dynamically created textboxes with jquery for value (if empty or filled with data) (<code>getelementbyid</code>) but i can not find a way to check theese DYN textboxes. </p>
  
  <p>The <code>ID_T</code> and <code>ID_C</code> will be loaded into another table containing these two PK's  and add string from textbox to value. 
  i would appreciate your help so much!</p>
  
  <pre><code>&lt;HTML&gt;
      &lt;HEAD&gt;
          &lt;SCRIPT&gt;
              function update_tech(id,description) 
              {
                  var x = confirm('Do you want to edit technology '+description);
                  if (x == true)
              {
              document.getElementById('update_id').value = id;
              //document.getElementById('description').value = description;
              //document.form_update.submit();
              }
              }    
          &lt;/SCRIPT&gt;
      &lt;/HEAD&gt;
      &lt;?php
          include "connection.php";
          $sql = "SELECT ID_C, Name FROM empresa";
          $rs = mysql_query($sql, $conn);
          $sql2 = "SELECT ID_T, description FROM technologies";
          $rs2 = mysql_query($sql2, $conn);
          while($row = mysql_fetch_array($rs2)) 
          {
          if (isset($_POST["box-".$row["ID_T"]]))
              if ($_POST["box-".$row["ID_T"]] != "")
                  echo "INSERT ....".$_POST["box-".$row["ID_T"]]."&lt;br&gt;";  
          }
          $rs2 = mysql_query($sql2, $conn);
          mysql_close($conn);
      ?&gt; 
      &lt;BODY&gt;
          &lt;SELECT NAME="customers" ONCHANGE="showCustomer(this.value)"&gt;
          &lt;?php
              if (mysql_num_rows($rs))
              {
              while($row = mysql_fetch_array($rs))
              {
          ?&gt;          
  &lt;option value='&lt;?php echo $row['ID_C'] ?&gt;'&gt;&lt;?php echo $row['Name']?&gt;&lt;/option&gt;    
          &lt;?php
                  }
              }
              else {
              echo "&lt;option value=\"0\"&gt;No customers&lt;/option&gt;"; 
              }
          ?&gt;
          &lt;/SELECT&gt;
          &lt;FORM METHOD="POST"&gt;
          &lt;?php
              echo "&lt;table border='0'&gt;";
              while($row1 = mysql_fetch_array($rs2)) 
              {
                  echo "&lt;tr&gt;";
                  echo "&lt;td&gt;&lt;INPUT TYPE='text' name='box-". $row1['ID_T']."' ID='box-". $row1['ID_T']."'&gt;&lt;/td&gt;";
                  echo "&lt;td&gt;" . $row1['description'] . "&lt;/td&gt;";
                  echo "&lt;/tr&gt;";
              } 
              echo "&lt;/TABLE&gt;";
          ?&gt;
          &lt;INPUT TYPE="SUBMIT"&gt;
      &lt;/FORM&gt;
  &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>