I have tried (data = "") and various others but none seem to work.
$.ajax({
url: "includes/peopleGoingList.php",
type: "POST",
dataType: "html",
data: {"ID": eventID},
success: function(data){
console.log(data);
if (data.length === 0) {
$("#dialog-attendees").html("<p>No one is going.. :[</p>");
} else {
$("#dialog-attendees").html(data);
}
});
['ok']set to true if everything went well and checkif (typeof data=='object' && data.ok)$json=array('ok'=>true, 'html'=>$thehtml); echo json_encode($json); die;and$("#dialog-attendees").html(data.html);