title: jquery accessing form element after ajax reply
body: <p>I'm sending form to server and when I receive it back I need to access its elements</p>
  
  <p>Here goes code.</p>
  
  <p>some html</p>
  
  <pre><code>&lt;here is the form&gt;
  &lt;div style='border-style:solid' id='user_pic_n_1'&gt;&lt;/div&gt;
  </code></pre>
  
  <p>and javascript</p>
  
  <pre><code>pic_type=($(this).attr('pic_type'));                    
  pic_number=($(this).attr('pic_number'));
  </code></pre>
  
  <p>explanation : pic_type gets > <code>user_pic</code> and pic_number gets > <code>1</code></p>
  
  <p>so the form is <code>user_pic_form_n_1</code></p>
  
  <pre><code>$('#'+pic_type+'_form_n_'+pic_number).ajaxSubmit({
      success: function(responseimage)
      {
  $('#'+pic_type+'_n_'+pic_number).html(responseimage);
  </code></pre>
  
  <p>now when the form gets into div, I need to get it's inputs values.</p>
  
  <p>please write code sample of how can I Access it</p>
  
  <p>In my example i'm trying to get values by alert like this but probably I write with mistakes</p>
  
  <pre><code>alert($(\"#'+pic_type+'_form_n_'+pic_number+' input[name=error]\").val());
  </code></pre>
  
  <p>elements name is 'error' so I'm trying to get it from the form.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Here is HTML form which I get from AJAX</p>
  
  <pre><code>&lt;form id='user_pic_form_n_1' name='user_pic_form_n_1'   action='/serv/pic_processor.php' method='POST'&gt;
  &lt;input type='hidden' name='error' value='456'/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>So when it gets from server into responseimage variable, I put that into Div and then I want to access this form and alert value of tag named 'error'</p>