title: pass a javascript variable within a html page into a html form (on the same page) for submission to perl cgi
body: <pre><code>&lt;script type="text/javascript"&gt;
  var id = getValue("ID");
  document.write(id);
  &lt;/script&gt;    
  
  &lt;form action="cgi-bin/runalg.cgi" method="post" enctype="multipart/form-data"&gt;
  &lt;input type="radio" name="genome" value="E.Coli"&gt; &lt;i&gt;E.Coli&lt;/i&gt; &lt;input type="radio" name="genome" value="Human"&gt; Human&lt;br&gt; 
  &lt;input type="submit" name="submit" value="Submit"/&gt;
  &lt;input type="reset" name="reset" value="Clear"/&gt;
  &lt;/form&gt;
  
  &lt;/body&gt;
  </code></pre>
  
  <p>How do I get the value of the JavaScript variable (var id) into the form so that on submission I can retrieve it in the <code>runalg.cgi</code> using the <code>$q&lt;-param("ID")</code> command?</p>