javascript using variable value in document.nameofformtosubmit.submit()
<p>How would I submit the id into the form name to submit a certain form?</p>

<pre><code>function submitComment(id)
{
    alert('comment on song id: '+[id]+'');

    document.postcomment.submit();

}
</code></pre>

<p>I want to be able to submit.. postcomment43 or postcomment 42.. whatever the value of ID is joint to postcomment</p>

<p>Tried this:</p>

<pre><code>function submitComment(id)
{
    alert('comment on song id: '+[id]+'');


    var formToSubmit = 'postcomment' + id;

    alert( ''+ formToSubmit +'' );
    document.formToSubmit.submit();


}
</code></pre>

<p>creates the formToSubmit name correctly but doesn't fire. how do I properly place the formToSubmit variable in the document.form.submit </p>

<p>It seems that just putting in formToSubmit is going to look for the form with name formToSubmit</p>
