This should be done in the success handler of the request below.