alert all error messages in javascript