Added showAlertWithText helper function.