How to reset textbox values in dialog after destroy?
<p>I have a dialog in which there are 2 textboxes.  I want to reset the textboxes values once the dialog is destroyed. How can I do that?</p>

<p>If I have entered values in the textboxes and clicked cancel, reopening the dialog will show the data entered previously.</p>

<pre><code>function setDialogWindows($element) {
      $('#change').dialog({    
           autoOpen: true,    
           width: 380,    
           buttons: {   
              "Cancel": function() {    
                   $(this).dialog('destroy');   
              },    
              "Accept": function() {    
              } 
     }): 
 }
</code></pre>

<hr>

<pre><code>$('#link').click(function() {    
    setDialogWindows('#change');    
});
</code></pre>

<hr>

<pre><code>&lt;div id="change" title="Change password" &gt;
    &lt;input type="hidden" id="User_Name" name="Name"/&gt;    
    &lt;input type="textbox" id="text1" /&gt;
    &lt;input type="textbox" id="text2" /&gt;
&lt;/div&gt;
</code></pre>
