History Page DB query changed to AJAX call