AJAX script now returns error messages