JavaScript Worklight Loading Indicator

Our applications loading process is lengthy, so to provide the user with indication the app is functioning and merely loading, we want to provide a loading/initializing indicator. I tried using WL's busy indicator, but it seems its availability isn't complete this early in the apps lifecycle. So I just created a simple DIV in our single-page application with loading indication. Once the app has completed loading, I just hide it. It works fine when I first run the app. Future runs behave differently.

First Run: It shows up immediately and is hidden once the app has finished its initialization.
Subsequent runs: It doesn't show up with the first presentation and flashes quickly just before the app completes initialization and begins normal flow.

The loading DIV (I made this completely static and not dependent on any JS or CSS):

    <div id="loadingInd"
         style="z-index:1;position:absolute;left:85px;top:185px;display:block;">
         Loading2...
    </div>

Hiding code:

    $('#loadingInd').hide()

A little info on the loading process:

We pre-load all JS and HTML files used by the application. A task to change this to a more lazy loading process is in the works, but hasn't moved high enough the priority list to be completed. Once all JS and HTML files are loaded, we present UI widgets (menu, login button, etc). Until the loading is complete we just have a loading splashscreen. So that loadingInd DIV is just static content in the splashscreen. What I don't understand is why it shows up immediately with the rest of the splashscreen when the app is first run, but doesn't show up till much later in subsequent runs. I think the reason it looks like it's flashing is because it's getting drawn just before the call to hide(). Is there something about subsequent runs that might cause this different drawing behavior? I've logged CSS info in multiple places along the initialization process and everything seems consistent among first and subsequent loads.


After a bit of discussion here, I've gone back to trying the busyIndicator. I show it just before I start loading all my content and hide it when I'm ready to start loading widgets. It behaves just like the DIV from above. I'm thinking there's something going on with the drawing.

Answer:1

I have the following simple example, When the line extends outside the rectangle, I want to clip it. I already have the rectangle used as an outline, what is a simple way to the same rectangle as a ...

I have the following simple example, When the line extends outside the rectangle, I want to clip it. I already have the rectangle used as an outline, what is a simple way to the same rectangle as a ...

I'm trying to learn Knockout and I'm following these two tutorials: Tutorial 1 Better list example But after half a day of trying (and failing), I'm not able to add or remove an item. Here is my ...

I'm trying to learn Knockout and I'm following these two tutorials: Tutorial 1 Better list example But after half a day of trying (and failing), I'm not able to add or remove an item. Here is my ...

  1. remove items from list python
  2. remove items from array javascript
  3. remove items from list
  4. remove items from amazon history
  5. remove items from startup windows 10
  6. remove items from apple wallet
  7. remove items from launchpad
  8. remove items from dictionary python
  9. remove items from icloud
  10. remove items from kindle library
  11. remove items from list c#
  12. remove items from etsy cart
  13. remove items from menu bar mac
  14. remove items from dock
  15. remove items from google search
  16. remove items from google drive
  17. remove items from photos
  18. remove items from pictures
  19. remove items from buy again amazon
  20. remove items from quick access

I am using Jquery to alter the source of an image as the page scrolls. However, currently they are loading as they are displayed and i would like to have them preload several images prior to being ...

I am using Jquery to alter the source of an image as the page scrolls. However, currently they are loading as they are displayed and i would like to have them preload several images prior to being ...

I've built a test client page and I'm trying to post to a Web API that I've built, but I get the following error: 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'val'...

I've built a test client page and I'm trying to post to a Web API that I've built, but I get the following error: 0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'val'...

  1. object doesn't support property or method
  2. object doesn't support this action
  3. object doesn't support this action ie11
  4. object doesn't fit print volume