title: passing in javascript values into iframe tag
body: <p>What's the best way to pass in the value held in a javascript variable into an iframe call on the same html page? I'm trying to improve my site's page response times by moving ad serving javascript  code (the typical <code>document.write('&lt;script type="text/javascript" src=".."</code>) into a separate iframe. (<a href="http://meanderingpassage.com/2007/08/15/keeping-javascript-widgets-from-controlling-your-blog/" rel="noreferrer">Based on this posting</a>) </p>
  
  <p>The request to the ad server typically require a seed variable declared once per site and incremented each time page is loaded by the client. What I want to do is pass in the seed variable into the document invoked by my iframe section. </p>
  
  <p>The seed variable is initialized in the 'head' tag of my main html document:</p>
  
  <pre><code>&lt;head&gt;
      &lt;script type="text/javascript"&gt;
      &lt;!--
      custom_seed=1;  
      //--&gt;
      &lt;/script&gt;
  &lt;/head&gt;
  </code></pre>
  
  <p>Later in the html document, I make the request through an iframe which returns the html necessary to invoke the ad server.</p>
  
  <pre><code>&lt;body&gt;
  &lt;!-- a bunch of html to display the page --&gt;
  &lt;iframe src="somepage.html" width="100%" height="100%"&gt;
  &lt;p&gt;No support for iframe&lt;/p&gt;
  &lt;/iframe&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>The html returned in the 'somepage.html' has a script used to call the ad server and needs to use the earlier declared seed variable as a parameter:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      document.write('&lt;script type="text/javascript" src="http://ad.server.net/...seed='+ custom_seed  +'?"&gt;&lt;/script&gt;');
      custom_seed++;
      &lt;/script&gt;
  </code></pre>
  
  <p>What's a good way to achieve this?</p>