This page has multiple Submit buttons, all with the same name so that on the server side (Coldfusion), we can determine the desired action by the value of the formAction variable.
<form name="selectionForm" method="post" onsubmit="alert('button pressed was ' + this.xxxx.value);">
<input type="submit" name="formAction" value="Next">
<input type="submit" name="formAction" value="Previous">
<input type="submit" name="formAction" value="Cancel">
I've seen methods that set a hidden field from within a submit button's onclick property, but our submit buttons are pulled in from a shared file, so I don't want to make special cases for this form.
What I'm looking for is some sort of DOM property that can be accessed from the Form's onsubmit handler that will show me the value of the submit button that was pressed. Something along the lines of "document.selectionForm.submit.value".