Making progress of javascript for location selection