onchange of a text field you call a function. You make an Ajax call to some serverside resource The resource returns true false Your clientside code shows the message or not
Personally I would not use an alert since that is obstructive to the user.
there are plenty of resources out on the net to make Ajax calls. If you can, it is better to use a library.
Eric
Don't get me started about those stupid light bulbs.