title: Jquery .ajax sucess update dynamic div
body: <p>I have a page with a number of different forms generated from a database. Each form has been given a div at the bottom to load data into. These have dynamic id: tempdiv_1 tempdiv_2 etc.</p>
  <p>I am trying to get the jquery to work to update the divs based on something like this.input.val which is a hidden input with the section ID.</p>
  <h3>Code:</h3>
  <pre><code>&lt;script type=&quot;text/javascript&quot;&gt;
  $('#formdataAddForm').live('submit' , function() { // catch the form's submit event
     $.ajax({ // create an AJAX call...
          data: $(this).serialize(), // get the form data
          type: $(this).attr('method'), // GET or POST
          url: $(this).attr('action'), // the file to call
          success: function(response,data) { // on success..
              $.fancybox({
              maxWidth    : 800,
              maxHeight   : 200,
              fitToView   : false,
              width       : '70%',
              height      : '70%',
              autoSize    : false,
              closeClick  : false,
              openEffect  : 'none',
              closeEffect : 'none',
              content     : response
          });
          $('#tempdiv_'+(('input[id=&quot;formdataSection&quot;]', form).val())).load('/page/list.php');
      }
  });
  return false; // cancel original event to prevent form submitting
  });
  &lt;/script&gt;
  </code></pre>
  <p>The bit I can't get to work is something along these lines:</p>
  <pre><code> $('#tempdiv_'+(('input[id=&quot;formdataSection&quot;]', form).val())).load('/page/list.php');
  </code></pre>
  <p>How can I get jquery to update a dynamic div? The forms all have the same ID so I cannot call form id.</p>