double post submitting with one form

double post submitting with one form

Hi,

I'm trying to use an Ajax system to make a double post method submitting.

The fact is I want to send the data of the form to a page called Mailing.php (no need to have a response of this page) and in the same time, I want to send the data to another page (external of my website).

I've tried to make something like this:

  1. function doubleSend() {   
  2.     var url = '/proxy?url=' + encodeURIComponent (my_page_for_the_mailing);
  3.     var response = false;
  4.     new Ajax.Request (
  5.         url, {
  6.             method: 'post',
  7.             onSuccess: function(transport) {
  8.                 document.getElementsByTagName('form')[0].action='the_external_webpage';
  9.                 response = true;
  10.             }
  11.         }
  12.     );
  13.     return response;
  14. }
But I can't retrieve the data. Can someone help me please ?