I have the below call AJAX code in my JavaScript code:
$.get("MyServlet",function(data, status) {
$('#ajaxResponse').text(data);
});
MyServlet
returns a piece of HTML code.
The content of my element #ajaxResponse
is set as text and not as HTML code. When I inspect element I found the content of my div like this:
<table border="1">
<tr>
<td>ID</td>
<td>Name</td>
<td>Surname</td>
</tr>
...