Variable stops AJAX call being cancelled

Global variable which stops AJAX call being cancelled put in place. More elegant solution for future needed.