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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:30:48+00:00 2026-06-10T02:30:48+00:00

When some action is invoked in my page, I make two ajax calls (A,

  • 0

When some action is invoked in my page, I make two ajax calls (A, B) to two different methods on my server.
Most of the times each request gets its matching response, but here and there both requests gets the same response! (of one of the requests – A,A or B,B)

The Ajax calls are made using JQuery and the server methods are implemented using Play! framework (in java).

Does anyone have any idea why does it happen and how to resolve it?

Thanks!

Ajax Call A:

var renderTypePreviewPageRoute = jsRoutes.com.eyeview.connectad.controllers.solutions.FeedLibrary.getFeedTypePreviewPage(feedHashId, feedType);

    // Makes an ajax call that gets the rendered solution page
    $.ajax({

        // Sets the route (URL) of the server call
        url:renderTypePreviewPageRoute.url,

        // Sets the method (GET / POST) of the server call
        type:renderTypePreviewPageRoute.method,

        //data:{ hashId: feedHashId, feedType: feedType, withPreview: withPreview }-->

        // In case of success
        success:function(result) {

            var typePreviewElement = $('#typePreviewSection');

            // Set the feed preview section html content to the rendered content got from the server
            typePreviewElement.html(result);

            typePreviewElement.removeClass('hidden');

            $('#feedPreviewGrid tr:eq(1)').removeClass('hidden');

            if ($('#feedPreviewSection').is(':visible')){

                typePreviewElement.show('blind');
            }

            var feedURL = urlEle.val();
            if (waitForFileTypePreview && feedURL != "") {
                feedEditNS.renderFilePreviewSection(true);
            }
        },

        // In case of failure
        error:function(xhr, ajaxOptions, thrownError) {

            // Shows the error message
            showError(xhr.responseText);

            // Clears the preview section
            feedEditNS.clearTypePreviewSection();

            var feedURL = urlEle.val();
            if (waitForFileTypePreview && feedURL != "") {
                feedEditNS.renderFilePreviewSection(true);
            }
        }

Ajax Call B:

var renderFilePreviewPageRoute = jsRoutes.com.eyeview.connectad.controllers.solutions.FeedLibrary.getFeedFilePreviewPage(feedHashId);

    // Makes an ajax call that gets the rendered solution page
    $.ajax({

        // Sets the route (URL) of the server call
        url:renderFilePreviewPageRoute.url,

        // Sets the method (GET / POST) of the server call
        type:renderFilePreviewPageRoute.method,

        // In case of success
        success:function(result) {

            // Set the feed preview section html content to the rendered content got from the server
            $('#filePreviewSection').html(result);

            // Shows the feed preview section
            $('#verticalLine').show('blind');
            $('#leftShadow').show('blind');
            $('#rightShadow').show('blind');
            $('#feedPreviewSection').show('blind');

            feedEditNS.createDataTable(withHeaders);

            waitForFileTypePreview = false;
        },

        // In case of failure
        error:function(xhr, ajaxOptions, thrownError) {

            // Shows the error message
            showError(xhr.responseText);

            // Clears the preview section
            feedEditNS.clearFilePreviewSection();

            waitForFileTypePreview = false;
        }
  • 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-06-10T02:30:50+00:00Added an answer on June 10, 2026 at 2:30 am

    I could not resolve the problem.
    So, I ended up combining both calls to one call to a single server side method.
    This method returned a JSON object containing both calls answers.

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

Sidebar

Related Questions

We're using jQuery.ajax() methods to request server data on a number of pages on
On some action in my admin I get a Permission denied page, and in
I need make some action (dump statistical data) before the Dart program ends. The
what is the best way to implement some action that should be executed each
I'm attempting to make a StateMachine execute some database action between states. So I
ASP .NET MVC2 application controller performs some action and redirects to grid page after
I currently have some action associated with when the user types something in a
I am trying to use some action when I click button in navigation controller.
I'm wanting to create a WoW cooldown effect where a player does some action
I have a code generating a timespan to calculate a duration of some action.

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.