submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit - Javascript
This is a discussion on submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit - Javascript ; 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 ...
-
submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit
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
-
Re: submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit
On Jun 21, 8:59 pm, abansal....@ wrote:
> 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?
-
Re: submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit
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. 
On Jun 22, 12:06 pm, "Skye Shaw!@#$" <skye.s...@> wrote:
> On Jun 21, 8:59 pm, abansal....@ wrote:
>
> > 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?
-
Re: submit 1 form to 2 servers or 2 forms to 2 server (1 form each) on 1 submit
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?
On Jun 23, 12:08 pm, abansal....@ wrote:
> 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. 
>
> On Jun 22, 12:06 pm, "Skye Shaw!@#$" <skye.s...@> wrote:
>
>
>
> > On Jun 21, 8:59 pm, abansal....@ wrote:
>
> > > 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?- Hide quoted text -
>
> - Show quoted text -
Similar Threads
-
By Application Development in forum DOTNET
Replies: 5
Last Post: 12-12-2007, 06:33 PM
-
By Application Development in forum Perl
Replies: 0
Last Post: 09-13-2007, 10:58 AM
-
By Application Development in forum Javascript
Replies: 4
Last Post: 08-13-2007, 10:02 AM
-
By Application Development in forum Adobe Acrobat
Replies: 5
Last Post: 06-25-2007, 11:11 PM
-
By Application Development in forum Javascript
Replies: 0
Last Post: 04-18-2005, 10:25 AM