real time javascript loading bar