title: jQuery - Search Mysql for results, then display within table, but also have a click link for each record
body: <p>Ive spent several hours trying to resolve an issue with very limited experience with jQuery which is not helping me.</p>
  
  <p>I am wanting to search a database for a list of results using a few input fields and then a submit button, when you click submit the values are passed to a .php script which returns the results and these are displayed in a table within a div container which works perfect.</p>
  
  <p>Each record is then displayed in its own row within the table, with columns for different data. </p>
  
  <p>record number
  name
  town</p>
  
  <p>What i want is for the record number to be a click link of some kind, which when clicked, it then passes that value and does a different mysql request displaying that unique records data in more detail in a different div container. This is the part i cant get to work as i believe its something to do with BINDING, or the .ON which i dont really know anything or understand how it works, as my experience is very limited.</p>
  
  <p><pre><code></p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
          $(document).ready(function() {
              $(".click").click(function() {
                  var name = $("#name").val();
                  var name = $(this).attr("id");
                  $('#2').load("mysqlrequest_unique.php?recordid=" +name);
              });
  
              $("#get").click(function() {
                  var sales_record_number     = "sales_record_number="    + $("#sales_record_number").val() + "&amp;";
                  var item_id                 = "item_id="                + $("#item_id").val() + "&amp;";
                  var user_id                 = "user_id="                + $("#user_id").val() + "&amp;";
                  var buyer_fullname          = "buyer_fullname="         + $("#buyer_fullname").val() + "&amp;";
                  var sale_date               = "sale_date="              + $("#sale_date").val() + "&amp;";
                  var paypal_transaction_id   = "paypal_transaction_id="  + $("#paypal_transaction_id").val() + "&amp;";
                  var ship_to_zip             = "ship_to_zip="            + $("#ship_to_zip").val() + "&amp;";
                  var item_title              = "item_title="             + $("#item_title").val() + "&amp;";
  
                  $('#1').load("mysqlrequest_all.php?"+sales_record_number+item_id+user_id+buyer_fullname+sale_date+paypal_transaction_id+ship_to_zip+item_title, function(){
                      var name = $("#name").val();
                      var name = $(this).attr("id");
                      $('#2').load("mysqlrequest_unique.php?recordid=" +name);
                  }
                  );
              });
          });
      &lt;/script&gt;
  
  &lt;div id="1" name='container_display_all'&gt;&lt;/div&gt;
  &lt;div id="2" name='container_display_unique'&gt;&lt;/div&gt;
  </code></pre>
  
  <p></pre></code></p>
  
  <p>This is what each row would have in the table, which doesnt work when its contained in generated html using a jQuery</p>
  
  <pre><code>&lt;a class = 'click' id = '19496'&gt;19496&lt;/a&gt;
  </code></pre>