How to solve SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data in ajax and php
You are returning JSON
from server and parsing HTML
dataType in client side. So, in your code change your datatype:
dataType: 'html'
to
dataType: 'json'
Hope this helps.