Ajax success event not working

The result is probably not in JSON format, so when jQuery tries to parse it as such, it fails. You can catch the error with error: callback function.

You don’t seem to need JSON in that function anyways, so you can also take out the dataType: 'json' row.

Leave a Comment