How to set a javascript variable or reuse one from another function
<p>I have a problem going on here and without going into a lot of detail and confusing everyone, let me just ask the simple question.</p>

<p>Here are two functions. I need to use the "id" variable in the SubmitForm() function as well. Can someone please tell me how to do this? This is how new I am to js. :)</p>

<p>Thanks for the help.</p>

<pre><code>  AC.chooseFunc = function(id,label)
  {
    document.qSearch.action = ".index.php?dc=2&amp;id="+ id;
    //document.qSearch.action = "index.php?dc=2";
    document.qSearch.submit();
  }

  *** This one fails.
  function SubmitForm(id)
  {
    document.qSearch.action = "index.php?dc=2&amp;id="+ id;
    document.qSearch.submit()
  }
</code></pre>

<p>What I need is the "id" var appended to the query string in the SubmitForm Function. Can someone tell me how to do this please? Thanks for the help!</p>

<p><hr /></p>

<p>Can this not be done??</p>
