Sprinkle the salt on top of the cookies right as they come out of the oven to ensure that the salt sticks.  When you sprinkle salt on hot cookies, there is enough heat to help melt the salt a little bit, helping it stick.  If you sprinkle the salt on top of the cookies before baking, it could disappear into the cookies.  If you sprinkle the salt on top of the cookies after they have already cooled, it won’t stick.