Jquery - value attribute is not adding for text-box in jquery-1.4.1.min.js
<p>I have a html table for display user list. when i click a <em>tr</em> row, that time it will find the  <strong>td</strong> values to text-box which is in another html table.</p>

<p>Assume, the given below html table is user list table,</p>

<pre><code>&lt;table id="tbl1" border="1"&gt;
   &lt;tr&gt;
       &lt;td&gt;name&lt;/td&gt;
   &lt;/tr&gt;
   &lt;tr id="tr1" style='cursor:pointer;'&gt;
       &lt;td&gt;Mani&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>And the given below html table for when we click a row in above html table dynamically assign the <strong>td</strong> values to <strong>text-box</strong> , like</p>

<pre><code>&lt;table id="tbl2"&gt;
   &lt;tr&gt;
       &lt;td&gt;&lt;input id="txt1" type="text"  /&gt;&lt;/td&gt;
   &lt;/tr&gt;
&lt;/table&gt;
&lt;br/&gt;
&lt;input type="button" id="btnReset" value="reset" /&gt;
</code></pre>

<p>What i did, when i click a row in that table, i get a html data &amp; assign this to a global variable &amp; when i click <code>reset</code> button that time, just i insert the html values to the <code>#tbl2</code>. </p>

<p>My jquery code is given below,</p>

<pre><code>var getHTML="";

$("#tr1").click(function(){    
   $("#txt1").val($(this).find('td').html());
   getHTML=$("#tbl2").html();
});

$("#btnReset").click(function(){
    $("#tbl2").html(getHTML);
});
</code></pre>

<p>It's working but text-box value are empty, How to i get the dynamic text-box values from html table.</p>

<p><a href="http://jsfiddle.net/smanimani/R77ZB/5/" rel="nofollow">Check here</a></p>
