title: change form action on button click
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3929685/how-can-i-invoke-multiple-actions-from-a-single-form">How can I invoke multiple actions from a single form?</a>  </p>
  </blockquote>
  
  
  
  <p>i have two buttons in a form. The one is for calculate, the other for send the calculated data in an email. 
  So i´ve made <code>"action="&lt;?php echo htmlspecialchars($_SERVER['PHP_SELF']); ?&gt;"</code> to calculate the whole thing in the form. Now i want to make the other button change the action to "mail.php" so i´ve made this: </p>
  
  <p><code>&lt;input type="submit" name="senden" value="Senden" onClick="document.form.action.value="mailer.php""&gt;</code></p>
  
  <p>But we all know, it doesn't work. So how do I get this to work?</p>