Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
11
rated 0 times [  12] [ 1]  / answers: 1 / hits: 19347  / 15 Years ago, fri, march 5, 2010, 12:00:00

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


More From » php

 Answers
17

you cannot do it using simple form post submit. but you can do it using AJAX.



as you soon as you call submit() fn, the data from the form is posted to the action url page. hence you might end up page being loaded.


[#97423] Tuesday, March 2, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
theo

Total Points: 680
Total Questions: 108
Total Answers: 81

Location: Laos
Member since Fri, Sep 11, 2020
4 Years ago
;