Jump to content

two actions on form


gum1982

Recommended Posts

 

Can you make a form send off two sets of information?

 

Ive got a script generated from a auto responses service can i have it so that when i hit submit on the form i can send the information through to another page.

 

I guess what im saying is? is their a way to have two actions on this form so when submit is pressed it sends to

 

action="http://www.getresponse.com/cgi-bin/add.cgi"

 

but could i also send it to say action="process.php" aswell.

 

Is their a way to do this?

 

 

this is the form

 

<form action="http://www.getresponse.com/cgi-bin/add.cgi" method="post" accept-charset="UTF-8">

 

<!-- form input fields -->

 

</form><script type="text/javascript">var el=document.getElementById("custom_http_referer"); el.value = document.location; </script>

 

 

Link to comment
Share on other sites

No, the browser will only send the form to one destination... would it not be possible to send it one on destination, and when it have finished send it to another?

 

Edit: Damn it, too slow... +1 what milesap said

Link to comment
Share on other sites

Yes It is possible to submit one form to two actions. It requires some JavaScript manipulation. Here is how:

Have two iframes in the page. Switch the 'target' of the form and submit the form.

 

Sample code:

 

function submitMyForm() {
  document.contact_us.submit();
      document.contact_us.action = "Another.php";
      document.contact_us.target='k4';
      document.contact_us.submit();
      
      return false;
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.