implement javascript alerts