How do I submit form with JS - dynamic form names?
Greetings,
I have a site that has dynamically generated forms with multiple submit buttons. My forms are like this, created using PHP and inserts different user names on the same page:
People click a link and the form submits via:
function SubmitForm(member)
{
document.member.submit();
}
The member name goes into the JavaScript to variable: member.
The Problem: is when this JS tries to submit the form called "john" for example, it searches for a form called "member" instead and it fails. Is there any way to fix this? I'm sure there is a way to deal with this kind of issue but I don't know it yet.
Bookmarks