generic show alert function with success support