I'm trying to figure out (on the client side) how to use javascript to submit a specific submit button for a form with multiple submit buttons.
Currently,
document.forms[0].submit()
does not seem to be working because it submits the first submit button instead of the second one, which is what I want to be submitted.
Is there a way to submit only the second submit button?
Here is an example of the buttons:
<input type="submit" class="submitButton_1" id="cancelButton" value="Cancel"
title="Cancel" name="cancel"/>
<input type="submit" class="submitButton_2 " id="Button" value="Test"
title="Test" name="TestButton"/>
document.forms[0].TestButton.click().