Fixed AJAX checking example