Prepare ajax save in client