title: Write text from parent page into an iframe textbox
body: <p>I have written an email program in php file and loaded into iframe to display in .tpl file. </p>
  
  <p>I just want to write email id into the sender textbox. The email id is displayed in parent page within a div and span also.</p>
  
  <pre><code>&lt;div id="aff_details" style="display:none;"&gt;
  &lt;span id="aff_email"&gt;{$username}&lt;/span&gt;
  &lt;span id="aff_url"&gt;{$data1}&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I just want to display the aff_email into the below textbox which in an iframe.</p>
  
  <pre><code>&lt;input type="text" name="sender" value="" class="TextBox" id="sender"&gt;
  </code></pre>
  
  <p>Now, I am using </p>
  
  <pre><code> $('iframe#sender').html($('div#aff_details span#aff_email').text());
  </code></pre>
  
  <p>But, It is not displaying anything in the textbox.</p>
  
  <p>Could anyone please help me out.</p>