title: Cant get value of hidden field after ajax Jquery
body: <p>I have a page that when a link is clicked it opens a pop up box to insert new charges. When this pop up box opens I use jquery load() function to insert a table with all the current charges (loaded from mysql) from a script on another page called load_charges.php. </p>
  
  <p>The problem I am having is I can not access any of the hidden values from the content I just loaded I use: </p>
  
  <pre><code>var charge_id = $(':hidden:first', $(this)).val();  
  </code></pre>
  
  <p>this normally gets me the value of the first hidden element but it does not work if I am trying get the info from the page load from load_charges.php. I will list my code below:</p>
  
  <p>case_cpanel.php:</p>
  
  <p>//HTML Table with Form elememt</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr class="lead_hover"&gt;
          &lt;td&gt;
              &lt;form class="calc" title="Case Expense Calculator" style="cursor:pointer;"&gt;
                  &lt;input type="hidden" id="lead_id" value="21946295" /&gt;
                  &lt;input type="hidden" id="final_id" value="74" /&gt;
                  &lt;input name="order" type="hidden" id="final_id" value="3" /&gt;
              &lt;/form&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr class="lead_hover"&gt;
          &lt;td&gt;
              &lt;form class="calc" title="Case Expense Calculator" style="cursor:pointer;"&gt;
                  &lt;input type="hidden" id="lead_id" value="21978679" /&gt;
                  &lt;input type="hidden" id="final_id" value="79" /&gt;
                  &lt;input name="order" type="hidden" id="final_id" value="1" /&gt;
              &lt;/form&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>// Jquery to load popup form box</p>
  
  <pre><code>$(".calc").click(function () {
      var value = $(':hidden:eq(0)', $(this)).val();
      $('input[name=lead_id]').val(value);
      var value = $(':hidden:eq(1)', $(this)).val();
      $('input[name=final_id]').val(value);
      var value = $(':hidden:eq(2)', $(this)).val();
      $('.order').val(value);
      var lead_id = $(':hidden:eq(0)', $(this)).val();
      var string1 = "token=&lt;? echo $_SESSION['token'];  ?&gt;&amp;lead_id=";
      var url = "../ajax/load_charges.php";
      var datastring = string1.concat(lead_id);
      $('#calc_right_display').html('&lt;div&gt;&lt;img src="../imgs/loading4.gif" align="center" /&gt;&lt;/div&gt;').load(url, datastring).show();
      $("#calc_div").overlay().load();
  });
  </code></pre>
  
  <p><strong>load_charges.php:</strong>
  // table that is load with new form elements</p>
  
  <pre><code>&lt;table width="266" border="0" cellpadding="5"&gt;
      &lt;? do { ?&gt;
      &lt;tr&gt;
          &lt;td width="163"&gt;
              &lt;? echo $row_charges[ 'rows'][ 'title']; ?&gt;
          &lt;/td&gt;
          &lt;td width="83"&gt;$
              &lt;? echo $row_charges[ 'rows'][ 'charge']; ?&gt;
          &lt;/td&gt;
          &lt;td width="27"&gt;
              &lt;form class="delete_charge" title="Delete Charge" style="cursor:pointer;"&gt;
                  &lt;input type="hidden" id="id1" value "&lt;? echo $row_charges['rows']['id']; ?&gt;"&gt;
              &lt;/form&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;? } while ($row_charges[ 'rows']=m ysql_fetch_assoc($row_charges[ 'query'])); ?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>//Jquery Code on load_charges.php</p>
  
  <pre><code>&lt;script&gt;
  $(".delete_charge").click(function () { * *
      var charge_id = $(':hidden:first', $(this)).val(); * *
      var str2 = "token=&lt;? echo $_REQUEST['token'];  ?&gt;&amp;delete_charge=true&amp;id=";
      var str_lead_id = "&amp;lead_id=&lt;? echo $_REQUEST['lead_id'];  ?&gt;";
      var url2 = "../ajax/cm_expenses_delete.php";
      var datastring2 = str2.concat(charge_id, str_lead_id);
  
      $('#calc_right_display').html('&lt;div&gt;&lt;img src="../imgs/loading4.gif" align="center" /&gt;&lt;/div&gt;').load(url2, datastring2).show();
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>The problem is var charge_id = $(':hidden:first', $(this)).val(); is not returning any value from the new page that just loaded. Any Help would be greatly appreciated.</p>
  
  <p>Thank you in advance. 
  Ryan </p>