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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:21:25+00:00 2026-05-20T06:21:25+00:00

When a user clicks on an extension icon to trigger the popup, it seems

  • 0

When a user clicks on an extension icon to trigger the popup, it seems Chrome waits for all of the js to execute before showing any content.

I’d like to show a “Loading …” screen before doing the ajax to grab the data and display it.

How can I show the popup.html before executing the js?

I’ve tried window.onload and setTimeout.

Update:

Here’s what I’m trying:

window.onload = function() {

    setTimeout(function() {
        var me = new MyApp();
        me.getDbs("apps")
    },5000);
}

getDbs hides #loading once it had retrieved the dbs. When I click on popup.html, it hangs for a sec and I see the dbs – the loading icon never gets a chance to be seen.

  • 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-20T06:21:26+00:00Added an answer on May 20, 2026 at 6:21 am

    setTimeout was working for me:

    //display loading msg here
    
    setTimeout(function(){
        //heavy js here
    
        //hide loading msg
    }, 0);
    

    edit

    Your setTimeout function is not correct, it is executing right away. You need to wrap your method into anonymous function so it is not evaluated right away:

    window.onload = function() {
        var me = new MyApp();
    
        setTimeout(function() {
            me.getDbs("apps");
        }, 1000);
    }
    

    (and I would drop that window.onload as it is not needed here imo)

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

Sidebar

Related Questions

Details: Only disable after user clicks the submit button, but before the posting back
When a user clicks on an image on a web page, I'd like to
Is it possible to detect when the user clicks on the browser's back button?
How can I capture the event in Excel when a user clicks on a
I want to close a System.Windows.Forms.Form if the user clicks anywhere outside it. I've
I'm attempting to register an anonymous function when a user clicks a cell in
I am trying to debug a problem where a user clicks on the button
I have a need to run different code when a user clicks or double-clicks
In my ASP.Net application I have a requirement that when a user clicks on
In a fictitious web application ... The user clicks a link The server starts

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.