submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit

A

abansal.itp

Hi,

I want to submit some data to 2 servers when user clicks a submit
button.

So I tried creating a hidden form and on submit, I called a java
script function which submits the hidden form first and then the other
form. But when hidden form is submitted, then control does not go back
to next submit and so nothing happens on 2nd server.

I am feeling that java script should be able to do this and I am doing
something incorrectly. Can you please suggest how can I solve this?

-nahk
 
S

Skye Shaw!@#$

Hi,

I want to submit some data to 2 servers when user clicks a submit
button.

So I tried creating a hidden form and on submit, I called a java
script function which submits the hidden form first and then the other
form.

That should work.
But when hidden form is submitted, then control does not go back
to next submit and so nothing happens on 2nd server.

Post the code you're using. What response do you expect from the 2nd
server?
What browser are you trying it on? Are you testing via the file or
http specifier?
 
A

abansal.itp

Here is the relevant code

function submitForms()
{
document.form1.limit.value = document.form2.amountLimit.value
document.form1.submit()
document.form2.submit()
}

Here first form1 is expected to update limit value in database and 2nd
server is a payment gateway and is expected to take control.

I am trying it using firefox, and will try it with IE today and let u
know my observations.

Not sure whether I got your last question or not, but I guess I am
testing using http specifier. :)
 
A

abansal.itp

Acutally here the problem is first server on form1 submit is sending
an empty html file and that's why nothing happens.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

I have tried with IE as well and there also its the same problem.

Any ideas how can i fix this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top