Why doesn't the 'success' event handler work?