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:
- function doubleSend() {
- var url = '/proxy?url=' + encodeURIComponent (my_page_for_the_mailing);
- var response = false;
- new Ajax.Request (
- url, {
- method: 'post',
- onSuccess: function(transport) {
- document.getElementsByTagName('form')[0].action='the_external_webpage';
- response = true;
- }
- }
- );
- return response;
- }
But I can't retrieve the data. Can someone help me please ?