Change type to ajaxType, and fix console.log error message