unnecessary alert deleted from javascript