JavaScript output to url
<p>I need to output a DIV width into a URL for an iframe but am having some trouble. I have managed to get java to output the div width, but encounter a problem when getting this into the URL. Below is the code I am using (notice the width=

<pre><code>&lt;iframe src="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=3f43697a78/height=670/width=&lt;script language='javascript'&gt;var e = document.getElementById('Single2');
document.write(e.offsetWidth);&lt;/script&gt;"&gt;&lt;/iframe&gt;
</code></pre>

<p>This outputs the URL as:   </p>

<blockquote>
  <p><a href="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=3f43697a78/height=670/width=" rel="nofollow">http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=3f43697a78/height=670/width=</a>var e = document.getElementById('Single2');
          document.write(e.offsetWidth);</p>
</blockquote>

<p>As you can see the URL has the full javascript in, not just it's output.</p>

<p>Ideally the URL should be as such (lets assume the DIV width is 650px).</p>

<blockquote>
  <p><a href="http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=3f43697a78/height=670/width=650" rel="nofollow">http://www.coveritlive.com/index2.php/option=com_altcaster/task=viewaltcast/altcast_code=3f43697a78/height=670/width=650</a></p>
</blockquote>

<p>Any ideas how I can get this working?</p>
