wrote javascript for ask question error alert