3 Replies Latest reply: Dec 27, 2013 3:53 PM by Gor_Mahia RSS

    creating delay before navigating to another page



      i am trying to create a popup with loading image on a page such that if you load this page the "loading... image in small div is displayed like for few 2-3  seconds then the page automatically navigates to another page and pass one parameter value.


      here is what i did:

      1. added a popup div in my page header and within iam referencig <img src=#WORKSPACE_IMAGES#loading.gif />    this works correct when the pages loads

      2. created DA to submit the "NEXT" button,


      the problem is that #2 is firing so fast before the iamge is loaded or seen,


      so how to make changes so #1 runs for 2-3 secs then #2 executes to go to target page  ?


      apex 4.2,



        • 1. Re: creating delay before navigating to another page
          Tom Petrus

          Why, in this day and age where everything has to be on-demand, just-in-time, constantly available and preferably fast, would you purposefully make a user wait simply to show them something will be loaded which could have already been there? If your page is there like *snap*, isn't that a good thing? Obviously the user is impatient, because otherwise all the effort of showing loading icons wouldn't be necessary ("it's stuck" after 1 second of loading. "it's super fast!" while clicking all possible buttons right after hitting a submit).

          What exactly are you trying to "solve" here? Is it fast but just not fast enough? Do you want to avoid a screen-flicker?

          I mean, I understand why you'd want to show loading icons in most situations, but I don't really see why purposefully making someone stare at them would be a good thing?

          • 2. Re: creating delay before navigating to another page
            David Drewette



            I use the jQuery plugin called blockUI (jQuery BlockUI Plugin)


            It basically blocks and darkens the screen (and shows a "loading" animated gif) while the next page is loaded and prevent users from accidentally double-clicking any buttons.

            Or from further interacting with the page when they shouldn't be,

            eg the IE progress bar is located at the bottom of the page and not plainly visible.


            The other benefit is that it actually informs the user than something is happening, rather than staring at a "stuck" screen.


            Hope this helps.



            • 3. Re: creating delay before navigating to another page

              i did this another way.