[jQuery] Showing indicator while loading options in select box
Hi Guys,
Please take a look at this page : http://localhost/jobsfed3/index4.html
Here the options in the second box are loaded from an array based on
the selection in first box. The problem is that some arrays are very
huge so they take long time to load (e.g. the last group 'Blue
Collar'). So i want to show the loading sign during the time options
are loaded into second box. but this is not working properly. The
loading sign appears very late, around the same time the options have
loaded. here is what i m using for it.
$("#groups").bind("change", function(){
$("#loading").show();
$("#jobs").removeOption(/./);
var a=$(this).val();
main_category=a;
$("#jobs").addOption(jobs[a], false);
window.setTimeout(HideLoad, 0);
} );
function HideLoad()
{
$("#loading").hide();
}
Any ideas what i should do. Thanks in advance.
Regards,
Sharan.