I have a form with two submit buttons, in code behind I got the values from each submit, but the problem is when I add a javascript onclick event on each submit, when I try to retrieve the values in PHP I get nothing. I get the input submit values only when I don't use an event.
I don't get the input submit values from this code:
<input type="submit" id="send1" value="Send1" name="sub1" onclick="validate1();"/>
<input type="submit" id="send2" value="Send2" name="sub2" onclick="return validate2();"/>
This one works:
<input type="submit" id="send1" value="Send1" name="sub1" />
<input type="submit" id="send2" value="Send2" name="sub2" />
I find a solution. If a value of a disabled button cannot be posted, then I'm just adding a hidden field with some value identifying the submit button clicked.