switched to ajax with alert