Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7418973
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T07:58:50+00:00 2026-05-29T07:58:50+00:00

What i am trying to do here is one click that sends out two

  • 0

What i am trying to do here is one click that sends out two posts. Here is my html

<form id="input" method="post" action="http:\\example.com\try">
      <input type="text" name="info1" id="text1"/>
      <input type="submit" id="submit"/>
</form>
<form id="input2" method="post" action="http:\\example.com\try">
      <input type="text" name="info2" id="text2"/>
</form> 

And the script

$("#submit").click(function() {
    $("#text2").submit();
});

what I thought was after I click on the submit button for the first form, the submittion for the second form should also be triggered, I should received 2 posts on my server side ,example.com/try. But turns out the server only receives the second post, which is info2 and also according to the chrome console, only the second post was triggered. Any idea why? is this feasible if not at all? By the way, the server and the APP are in different domains.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T07:58:51+00:00Added an answer on May 29, 2026 at 7:58 am
    $("#text2").submit();
    

    is triggering a page postback before the original submit event can complete, and post your first form. Also, instead of calling submit() on the submit button, I think it’s more standard to call it on the actual form, which for you would be: $("#input2").submit();

    If you want to post two forms like that, you’ll have to fire off ajax requests for both, and handle their callbacks.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a fun one I've been trying to figure out. I have the following
Here's what I am trying to do: typedef enum { ONE, TWO, THREE }
I'm trying to perform a skew on an image, like one shown here (source:
Well, here's a nice obscure one. I'm trying to compile the latest open transport
I have a form with a few rows that I am trying to insert
I am trying to copy shipping address into billing address with one click. As
Please go here and click on the link twice: http://bogsorken.com/test/index.html It will open up
I am trying to implement a program that sends the same messages to a
Just trying out Mongoid at the moment, I've run into an issue that's probably
I'm trying to have on click ' each ' item that was a class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.