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

  • Home
  • SEARCH
  • 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 6952275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:19:40+00:00 2026-05-27T14:19:40+00:00

I want to have an ajaxed form and when a user clicks submit it

  • 0

I want to have an ajaxed form and when a user clicks submit it will submit the form values to a php file nothing fancy here and to that point anything is clear to me.

Now I want to have several responses from the server to shop in the response div.

For example the form is for writing a post and then my php file will post that post to 5 different forums and I want to show in the result exactly what it is doing like

Posting to forum 1… then clear that and show Posting to forum 2…

I want to show what the script is currently doing live in the jquery output div and my question is how to do that? Please tell me the code requirements in jquery as well as the ones in PHP.

Thanks in advance for your help

  • 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-27T14:19:41+00:00Added an answer on May 27, 2026 at 2:19 pm

    Here is a function that should accomplish this for you:

    //'step' indicates the current iteration of the posting loop, and 'limit' tells it after how many iterations to stop. If you want to post to 5 of 5 forums, set 'step' to 1 and 'limit' to 5.
    
    function submitSteps(step, limit)
    {
        if (step <= limit)
        {
        $.ajax({
            url: 'http://example.com',
            data: 'postTo='+step,
            beforeSend: function()
            {
                 if ($('#notice p:last').html().indexOf('problem') > -1)
                 {
                      $('#notice p:last').remove();
                 }
                 $('#notice').append('<p>Posting to forum '+step+'...</p>');   
            },
            success: function()
            {
                 $('#notice p:last').remove();
                 $('#notice').append('<p>Post to forum '+step+' complete!</p>');
                 window.setTimeout('submitSteps(step+1, limit)', 1000);   
            },
            error: function()
            {
                 $('#notice p:last').remove();
                 $('#notice').append('<p>There was a problem posting to forum '+step+'.</p>');
                 window.setTimeout('submitSteps(step, limit)', 1000);    
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have simllar question like here: static-method-invocation , but in PHP. Simply, I want
Here's what I want to achieve, I have a select box that loads in
If I have output from two sources that I want to put together on
Here is my problem: I want have my qmake script detect my opencv version
I want have a query with a column that is a hardcoded value not
I have a DropDownList that is filled with values returned by a SQL Query.
I have want to do something like this to mimic a form post: $.ajax({
I have want to save classes to a file in python. I want something
I want have a single database that uses InnoDB tables instead of myISAM tables
I want have a table in my view that is going to put 3

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.