title: Retrieve iframe values to client side page
body: <p>How can I retrieve values from the iframe form id, and call it to my client side html.</p>
  
  <p>(client side html)
  sample.html</p>
  
  <pre><code>&lt;head&gt;
      &lt;script&gt;
          function alertThis(){
              alert(parent.myframe.formsubmit.a_token.value);
          }
      &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;iframe name = "myframe" src="http://domain.com/sample/index.php"&gt;
      &lt;button onClick = "alertThis();"&gt;Click Here&lt;/button&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>(server side php)
  index.php</p>
  
  <pre><code>&lt;form name = "formsubmit"&gt;
        &lt;input id = "a_token"  value="&lt;?php echo $_SESSION['user'] ?&gt;"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>but it does not return any.</p>