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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:02:24+00:00 2026-05-23T07:02:24+00:00

I have a small ajax jquery script which returns some XML for me. Whilst

  • 0

I have a small ajax jquery script which returns some XML for me. Whilst it is working and communicating with the server I am displaying a loader animation.

The problem is I don’t see the animation. Either I have done something wrong or the network conection is really quick.

Does anyone know how I can introduce a delay to my ajax code to slow the process down and I can test the animation feature?

Thank you.

ps: ajax code is below, just incase

function fetchData($nodeid, $area){
    if( $nodeid != $currentRoomId ){
        popupBox($area);//$area, $roomInfo);
    }

        var $nid, $title, $classroom, $boardroom, $cabaret;
        $.ajax({

            url: "/room/" + $nodeid + "/rss.xml",
            dataType: "xml",
            success: function($xml){

                $returnXML  =   $xml;
                $($xml).find('node > *').each(
                    function(){

                        switch( $(this).attr('name') ){
                            case 'Nid':
                                $nid    =   $(this).text();
                            break;
                            case 'Title':
                                $title  =   $(this).text();
                            break;
                            case 'Classroom':
                                $classroom  =   $(this).text();
                            break;
                            case 'Boardroom':
                                $boardroom  =   $(this).text();
                            break;
                            case 'Cabaret':
                                $cabaret    =   $(this).text();
                            break;
                            case 'Theatre':
                                $theatre    =   $(this).text();
                            break;
                            case 'Notes':
                                $notes  =   $(this).text();
                            break;
                            default:
                            break;
                        }//close switch statement
                    }
                );
                $roomInfo   =   new Array();
                $roomInfo.push('Title', $title);
                $roomInfo.push('Classroom', $classroom);
                $roomInfo.push('Boardroom', $boardroom);
                $roomInfo.push('Cabaret', $cabaret);
                $roomInfo.push('Theatre', $theatre);
                $roomInfo.push('Notes', $notes);
                highlightRow($nid);
                popupBox($area, $roomInfo);
            },
            statusCode: {
                200: function(){
                    //alert('responding just fine!');
                }
            },
            error: function(){
                //alert('Ajax not responding!');
            },
            complete: function(){
                //alert('completed!');
            }
        });
    }
  • 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-23T07:02:25+00:00Added an answer on May 23, 2026 at 7:02 am

    Quick solution is to move your ajax call inside the if block. On success/error – hide the animation. That won’t simulate a delay, but it’ll ensure that your animation gets displayed (even if for ms).

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

Sidebar

Related Questions

I have a small jQuery plugin that I use for form AJAX validation. There
I have a small jQuery script that gets information by looking at an ID.
I'm trying to learn JQuery - and I have a small problem with ajax.
I have this small jquery script that does not work if I remove the
I have a small AJAX application, written in PHP that I did not secure
I have a small ajax application built with php. Using phpMyAdmin I have set
I have a small JS function that does Ajax for me and another like
I have small page which has label, DropDownList and a submit button. <div> <asp:label
I have a small VB.NET application that I'm working on using the full version
I have a DB containing small news and a web app displaying these. I

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.