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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:30:48+00:00 2026-05-31T01:30:48+00:00

I am lost with this idea of mine. I have never made a loading

  • 0

I am lost with this idea of mine. I have never made a loading screen and do not even know where to begin.

Here is the call I am making:

$('.ranks').change(function () {
                if (this.checked) {
                    getRanks($(this).val());
                }
            });

Here is the function:

function getRanks(rankid) {
            $.getJSON('message_center_getMessageLists.asp', { rankid: rankid }, function (json) {
                var options = '';
                $.each(json.rank, function (i, item) {
                    options += '<option value="' + item.distID + '">' + item.name + ' (' + item.distID + ')</option>';
                });
                $('#fromList').find('option')
                        .remove()
                        .end()
                $('#fromList').append(options);
            })
                    .error(function () { alert("There was an error while trying to make this request;  If it persists please contact support"); })
                    ;
        }

I have not been able to get anything working yet, so above is my original code before my attempt. I have the loading.gif. I tried to use toggleClass to add the loading css to the body, but the loading screen appears behind everything, tried to use z-index and that wouldn’t bring it out front. I’m at a loss.

Here is the CSS I am using, it was something another individual wrote and I was trying to duplicate his work but am having issues.

.loading{
        background-image:url(newloader.gif);
        background-attachment:fixed;
        background-repeat: no-repeat;
        background-position: center center;
    }
  • 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-31T01:30:49+00:00Added an answer on May 31, 2026 at 1:30 am

    Here’s how I do it:

    css
        .modal {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.8);
        z-index: 1;
    }
    
    js
    $('body').append('<div class="modal">');
    

    I append it on beforeSend() in the ajax call and remove it on success. Something like that.

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

Sidebar

Related Questions

Friends, I'm lost here. I have this WCF Rest service returning data in json
I'm completely lost on this, I'm not sure what is causing this error: Fatal
I'm sort of lost on this. I have an application that is reading from
This is driving me crazy and has resulted in lost work (not much, at
OKay I lost alsmost the whole day on this. I have a webapp where
I ran into this today and have no idea why the C# compiler isn't
I came upon this blog post the other day and literally have no idea
I am completely lost with encoding issues, I have no idea what's going on,
This is most likely a simple question, but I have no idea how to
I know this is frowned upon, I was just exploring the idea and for

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.