add javascript for 'message sent' alert