Two different actions on form submit

Posted by Pankaj Khurana on Stack Overflow See other posts from Stack Overflow or by Pankaj Khurana
Published on 2010-03-05T05:52:51Z Indexed on 2010/04/02 15:03 UTC
Read the original article Hit count: 419

Filed under:
|

Hi,

I have a form with a submit button. I have called a function on click of submit button.

function actionPage(form1)
{
  form1.action="action1.php";
  form1.submit();
  return(true);
}

Now i want that the form data should be submitted to two different pages. These pages are on different servers.

I know that we can send the data to a particular page according to the conditions but i am not sure whether we can submit to two different pages at the same time i.e:

function actionPage(form1)
{
  form1.action="action1.php";
  form1.submit();
  return(true);
  form1.action="action2.php";
  form1.submit();
  return(true);

}

Right now it is showing action1.php

Please guide me on this .

Regards,

Pankaj

© Stack Overflow or respective owner

Related posts about php

Related posts about JavaScript