It was it a big mistake because lazy developers still use it because it is so easy. Don't fall in the trap. Do not use the alert function.
Light boxes I personnally don't like light boxes but they have the momentum at this moment. There are hundreds of library that can help you with them so don't implement another one and re-use an existing one please… Contextual messages Why not show a message where it happened. A little knowledge of DHTML and you're ready.
Example. On Ecstatik! (a project on which I worked), when there's an error with the ajax vote, the label “I laughed!” is changed to “error!” written in red. Maybe it's not the idea of the century but it works and it tells you where the error is. Fading in/out messages These ones are more difficult to do but Google and Wordpress do it elegantly. Use a library with a fading in/out function and show a message at the top of the page (or anywhere visible by the user). The user will get used to see messages at this place and will like the fact that they don't have to click.