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 6338275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:24:43+00:00 2026-05-24T19:24:43+00:00

I have two Ajax requests that I am wanting to combine together into one.

  • 0

I have two Ajax requests that I am wanting to combine together into one. I’m having trouble figuring how to do this as one is using $.ajax() and another is using $.get().

As I’m fairly new to Ajax, this is causing me much pain. If you could help, it would me much appreciated.

Ajax Request #1

$.ajax
({
    type: "GET",
    url: "new_arrivals_data.php",
    data: "page="+page,
    success: function(msg)
    {
        $("#gallery_container").ajaxComplete(function(event, request, settings)
        {
            gallery_show();
            loading_hide();
            $("#gallery_container").html(msg);
        });
    }
});

Ajax Request #2

$.get("new_arrivals_data.php",{imgs: value}, function(data){
    $("#gallery_container").html(data);
});

Thanks for any help you can offer.

  • 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-24T19:24:44+00:00Added an answer on May 24, 2026 at 7:24 pm

    They are actually both GETs $.get is short hand for $.ajax({ type:'GET'.

    So combining them might work depending on your server’s response:

    $.ajax
    ({
        type: "GET",
        url: "new_arrivals_data.php",
        data: {page:page, imgs: value},
        success: function(msg)
        {
            gallery_show();
            loading_hide();
            $("#gallery_container").html(msg);
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a JavaScript function that makes two consecutive Ajax requests using jQuery. I
I have two separate Ajax Post requests that i need to add together, they
I have a series of two chained selects using ajax that work great. I
The setup I have an MVC application that's making AJAX requests into my controller.
I have this strange issue where sometimes if I make two AJAX requests to
I have two Ajax calls. I need to make sure that a JS function
I have two ajax calls. Both are sync. Both call methods from one controller.
I am working on a filter functionality using ajax/jquery and php/mysql.I have two sets
I have a two JavaScript files: Main.js Pmt.js I'm also using thick box (Ajax
I currently have a ajax script that dynamically builds two select boxes enabled with

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.