trying to use ajax for loading gif