title: How to retrieve value from jQuery UI Dialog loaded from external page
body: <p>As following, suppose I have a click button in A.html to open a ui dialog, 
  and the dialog will load the B.html as content.</p>
  
  <p>So, if I want to get the value which id=inputName in B.html after the user click the button "ok" on the dialog, how can I do? I always get "undefined".</p>
  
  <p>Sorry that maybe a stupid problem becase I'm new to jQuery.
  I will very apreciate if you can help me.</p>
  
  <p>A.html</p>
  
  <hr>
  
  <pre><code>$(function(){
      $('#name').click(function(){
          var aaa = window.parent.$.dialog({
              buttons: {
                  'ok': function(){
                      //get the value from B.html(ex.the value which id=inputName)
                      $aaa.dialog('close');
                  }
              }
          });
  
          var link = 'B.html';
          aaa.load(link);
          aaa.dialog('open')
      });
  }); //jquery code
  
  
  &lt;div&gt;
      &lt;input type="button" value="input your name" id='name'&gt;
  &lt;/div&gt;  //html code
  </code></pre>
  
  <hr>
  
  <p>B.html</p>
  
  <hr>
  
  <pre><code>&lt;input type="text" name="inputName" id="inputName"/&gt;
  </code></pre>
  
  <hr>