title: tell what form a button pressed is coming from
body: <p>I have a single page application that uses multiple forms to display data.  Most of the forms have the same input fields. I used JavaScript to create the form input fields - done once for all forms.</p>
  
  <p>I can tell what form and field has been changed by looking at the form element <code>form1.elements["varietyName"].options[form1.elements["varietyName"].selectedIndex].text</code> or if it has been changed on form2.</p>
  
  <p>I know how to create a button via JavaScript and populate it on multiple forms, but how can I tell what form that button was pressed on?</p>
  
  <p>I can't give my button an <code>onclick</code> event, as it will be on form1 and form2. I also don't want the form to be submitted to the server when the button is clicked, so I can't use that.</p>