get text value from dynamic created object
<p>I'm still searching solution for getting values from  dynamic created object.</p>

<p>Follwing code generates dynamic object from zip2.php</p>

<p><code> </p>

<pre><code>$(document).ready(function() { 
    $("#submit").click(function(e) {
      e.preventDefault();

      var q = $("#k").val();

      $.ajax({
          type: "POST",
          url: "zips.php",
          data: "q="+ q,
          dataType: "html",
          success: function(res) {
               $("#result").html(res); $('#result').trigger('create');  
        },
      });

    });       

});
</code></pre>

<p></code> </p>

<pre><code>&lt;div data-role="content"&gt;

 &lt;div id="result"&gt;&lt;/div&gt;

&lt;/div&gt;
</code></pre>

<p>It created object like this format.(contents of zips.php)</p>

<pre><code>&lt;? echo " &lt;div&gt;&lt;ul id='zips' data-role='listview' data-inset='true' data-theme='c'&gt;";
while($row = mysql_fetch_array($result)) {
$out .= "
 &lt;li&gt;
 &lt;a name='submit_button' href='#mainPage'&gt;&lt;span class='zip1'&gt;$zip1&lt;/span&gt;-
 &lt;span class='zip2'&gt;$zip2&lt;/span&gt;&lt;br /&gt;
 &lt;span class='address'&gt;$row[zp_sido] $row[zp_gugun] $row[zp_dong] $row[zp_bunji]   &lt;/span&gt;&lt;/a&gt;
&lt;/li&gt; \n";
}
  echo $out."&lt;/ul&gt;";
</code></pre>

<p>?></p>

<p>And this script get the text() value from dynamic object and insert it to form.</p>

<pre><code>   &lt;script&gt;
$(document).ready(function() {
$('a[name=submit_button]').click(function(){
                                         var inputVal1 = $('.zip1, this).text(); 
 var inputVal2 = $('.zip2', this).text(); 
 var inputVal3 = $('.address', this).text();


     $('div input[name=zip_code1]').val(inputVal1);  
$('div input[name=zip_code2]').val(inputVal2); 
$('div input[name=address1]').val(inputVal3); 

   &lt;/script&gt;

   &lt;div&gt;
    &lt;form&gt;
      &lt;input type="text" id='zip_code1' name="zip_code1" &gt; - &lt;input type="text" id='zip_code2 name="zip_code2"&gt;&lt;br /&gt;
      &lt;input type="text" id='address1' name="address1"&gt;
    &lt;/form
   &lt;/div&gt;
</code></pre>

<p>The problem is that "var inputVal1 = $('.zip1, this).text();" gets null from dynamic objects class name "zip1". </p>
