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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:22:02+00:00 2026-05-25T11:22:02+00:00

At the moment, I have a simple app that Ajax’s to a server, gets

  • 0

At the moment, I have a simple app that Ajax’s to a server, gets some JSON and then does something with it. I’d like to add in messages to show loading images and other info, but I’m struggling with simplemodal at the moment because it doesn’t queue modals, so it just fires everything as soon as it comes in. I’ve tried writing a queue for it, didn’t work out so well 🙂

The app should:

  • Send ajax request (show modal, stop user clicking anything)
  • Ajax complete (hide modal, allow clicking)
  • If [for example] return JSON object has “message” set ( if (strJson.message)) { } ) show message as modal
  • Allow user to close modal

While they were reading the message, if another ajax call has come and gone, and we have more modals to show, they should be queued to show when the current one is closed.

This seems like the kind of thing that should be out there but I can’t see anything that mentions it specifically.

Any ideas? 🙂

  • 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-25T11:22:03+00:00Added an answer on May 25, 2026 at 11:22 am

    You can take the messages and put them into an array, then when the dialog is closed you can check to see if there is more messages, if there is pull the next message from the array and display it. Here it an example using jQuery UI Dialog.

    HTML

    <div id="dialog"></div>
    

    JavaScript

    var messages = [],
        addMessage = function (msg) {
            messages.push(msg);
            if (!$('#dialog').dialog("isOpen")) {
                displayMessage();
            }
        },
        displayMessage = function () {
            $('#dialog').html(messages.shift()).dialog('open');   
        };
    $(function () {
        $('#dialog').dialog({
            autoOpen: false,
            modal: true,
            close: function () {
                if (messages.length > 0) {
                    displayMessage();
                }   
            }
        });
        addMessage('First Message');
        addMessage('Second Message');
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So at the moment I have a simple reminder app that you enter some
I have a simple architecture at the moment which looks a little something like
What I have at the moment is a simple Facebook app that has pulled
I am developing a web app that in some moment the user requests something
I currently have a simple iPhone app that loads a custom subclass of UIView.
I have a simple mobile app in Titanium that I'm using to debug the
I have a simple little application that performs some analysis of all our corporate
At the moment I have a very simple script. If I type the commands
At the moment I have a DocumentViewer in a WPF window that displays an
At the moment I have a combobox that is populated from the name fields

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.