Here is a snippet from my HTML page. I am looking to replace the image address (result[i].url
) with an actual image. I am not sure if this is possible due to the CSS styles being used in this section.
function BindStudents() {
$.ajax({
type: 'GET',
dataType: 'json',
url: "http://127.0.0.1:8000/memes", success: function (result) {
var totalCount = result.length;
var structureDiv = "";
for (let i = 0; i < totalCount; i++) {
structureDiv += "<tr>" +
" <td>" + result[i].id + "</td>" +
" <td>" + result[i].name + "</td>" +
" <td>" + result[i].url + "</td>" +
" <td>" +result[i].caption + "</td>" +
" <td><button class='btn btn-link' onclick='return confirm(\"Are you sure you want to delete this record?\",DeleteRow(" + result[i].id + "))'>Delete</button></td>" +
" </tr>";
}
$("#divBody").html(structureDiv);
}
});
}