Let A be an arbitrary unital *-algebra over the real or complex field F, and let η ∈ F with η = 1. Assume that : A −→ A is a map. It is shown that, if satisfies (A)(P) − η(P)(A) ∗ = AP − ηPA∗, for each A ∈ Aand projection P ∈ {P1, I−P1}, then(I)2 = I and (A) = A(I) for all A ∈ A. Also, if A is a nest algebra on Hilbert spaceH and is a surjective map that satisfies (A)(P) − (P)(A) = AP − PA, for each A ∈ A and all idempotents P in A, then we characterize the concrete form of on A.