Update ajax.js

bugfix  when failure on ajax