implement simple ajax with alert