Link to home
Start Free TrialLog in
Avatar of KeithMcElroy
KeithMcElroy

asked on

Jquery process status box

Running into trouble making my page show a processing status on longer winded processes.  The processes dominate and the status cell never has a chance to display.

How can I make the status fade in  work before the show begins?


      $('#WfEmpId').blur(function()
      {
            $('#status').fadeIn();            
            //Populates Name, Pay Assgn List and Period List  GOTO:  TOWBFORM/js/fetch-handlers.js:10     fetch and display Name, Active Pay Assgs, and Active Pay Periods  
            $().fetch_hr_pemaster({      
            'empid' : $("#WfEmpId").val()
            
            });
            
            loadPreviousPer();   //GOTO: loadpreviousperiod.js
            loadCurrentPer();    //GOTO: loadcurrentperiod.js
            $('#status').fadeOut();
      });
ASKER CERTIFIED SOLUTION
Avatar of Steve Krile
Steve Krile
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of KeithMcElroy
KeithMcElroy

ASKER

this works really well.  I am fading out at the last line within the fadeIn and that seems to work.
However, new at this, is that the best place to put the fadeOut?
Will award points, just wanted to ask this follow up ?
Thanks a mil!
Well, it depends - does loadCurrentPer(); or loadPreviousPer();  take a while?  If so, you may consider sticking the fadeOut() at the end of those processes.  Javascript has a preference to plow through every line of code and doesn't necessarily wait for the last line to execute before doing the next - especially if your load functions are doing ajax work.