How would I submit the id into the form name to submit a certain form?
function submitComment(id)
{
alert('comment on song id: '+[id]+'');
document.postcomment.submit();
}
I want to be able to submit.. postcomment43 or postcomment 42.. whatever the value of ID is joint to postcomment
Tried this:
function submitComment(id)
{
alert('comment on song id: '+[id]+'');
var formToSubmit = 'postcomment' + id;
alert( ''+ formToSubmit +'' );
document.formToSubmit.submit();
}
creates the formToSubmit name correctly but doesn't fire. how do I properly place the formToSubmit variable in the document.form.submit
It seems that just putting in formToSubmit is going to look for the form with name formToSubmit