I have the following code. This code is to submit a form to two different actions. First action is a script in Page1.php, another is a script in Page2.php.
Code: Select all
<script language=javascript>
function doSubmit() {
document.Form1.action = "Page1.php";
document.Form1.submit(); // Submit the page
document.Form1.action = "Page2.php";
document.Form1.submit();
return true;
</script>Why is it? Is there a better solution to run 2 different actions (2 different php scripts) in 1 form?