following programming of ajax client