added server confirmation code for receiving ajax request