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(functio n()
{
$('#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();
});
How can I make the status fade in work before the show begins?
$('#WfEmpId').blur(functio
{
$('#status').fadeIn();
//Populates Name, Pay Assgn List and Period List GOTO: TOWBFORM/js/fetch-handlers
$().fetch_hr_pemaster({
'empid' : $("#WfEmpId").val()
});
loadPreviousPer(); //GOTO: loadpreviousperiod.js
loadCurrentPer(); //GOTO: loadcurrentperiod.js
$('#status').fadeOut();
});
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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.
ASKER
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!