I got parserror with loading string

53 Views Asked by At

I'm trying to load a response with a string, but I got a parser error. My code is the following:

<div class="divright">
   Div Content
</div>    

<script>
$(document).on("click", '.tribe-mini-calendar-day-link', function() {
var date = $(this).data('day');

$.ajax({    
    type: "POST", 
    url: TribeMiniCalendar.ajaxurl,
    data: {
      action: 'event_details',
      date: date
    }, 
    success: function (response) {
      console.log(response)
    },
    error: function (request, error) {
      alert ("FOUT:" + error); 
    }
});    
</script>

And it gives me : ERROR:parsererror

And if i inspect the responsecode, it says this:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width-device-width, intial-scale=1">

    <!-- Latest compiled and minified CSS -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">

    <!-- Optional theme -->
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">

    <!-- Latest compiled and minified JavaScript -->
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
</head>
</html>


{"status":true,"html":"<p><strong>Pratice: <\/strong> 2017-09-23 till 2017-09-24<\/p>"}

What is wrong? The status is "true".

0

There are 0 best solutions below