
Код:
<script>
fucntion DoSubmit(val) {
document.getElementById('sel').value = val;
document.getElementById('forma').submit();
}
</script>
<form name='forma' id='forma' action='somescript.some' method='POST'>
<input type='hidden' name='sel' id='sel' value='-1'>
</form>
<input type='button' value='Первая' onclick='javascript:DoSubmit(1);'>
<input type='button' value='Вторая' onclick='javascript:DoSubmit(2);'>