title: One Form, with 2 actions
body: <p>I am attempting to create an HTML form, that of which uses the submit button, to email me the data that has been entered (have that part covered) but also send the data to another external page (that can handle this request).</p>
  
  <p>I can have it working by doing:</p>
  
  <pre><code>&lt;form name="contactform" method="post" action="http://somesite.com/page.php"&gt;
  </code></pre>
  
  <p>But, I also need it to submit to a local page (form.php) at the same time.</p>
  
  <p>I have tried javascript, by doing this for the submit button:</p>
  
  <pre><code>  &lt;input type="submit" value="Submit" onclick="return doSubmit();"&gt; 
  </code></pre>
  
  <p>With this code in the source:</p>
  
  <pre><code>function doSubmit()
  {
      document.contactform.action = "form.php";
      document.contactform.submit(); 
      document.contactform.action = "http://somewebsite.com/page.php";
      document.contactform.submit(); 
      return true;
  }
  </code></pre>
  
  <p>But when I do this, the information is not sent to my email, and instead of displaying the result on form.php the page is refreshed.</p>
  
  <p>Any ideas on how I can make this work in a simple way?</p>