Modify the function of PostData with $.ajax instead of $http