I have one form with two submit buttons (like in the question Two submit buttons in one form):
<form action="/doit" method="post">
  <input name="commonfield1" />
  <input name="commonfield2" />
  <input type="submit" name="action1" value="Do something" />
  <input type="file" name="file" onchange="this.form.submit()" />
  <input type="submit" name="action2" value="Do something else" />
</form>
When doing onchange="this.form.submit()", which submit is used? How to select if we submit using action1 or action2?
Note: why not having two separate forms? Because the commonfield1 and commonfield2 inputs should be common to both.
