I was wondering how I could show an image in a form that shows information of the fields of a table depending on its id, I am not saving the image in itself, but the address of the folder where I have saved the image.
and I would like to show it in the form, either with a hyperlink tag or with the img tag, but I do not know how. I use Ajax to show the fields in the form.
function Tinv(id){
$.ajax({
type:"POST",
data:{'id':id},
dataType:'json',
url: uri + "/inventario/mostrarInv",
}).done(function(respuesta){
$("#id").val(respuesta.id);
$("#ubicacioni").val(respuesta.ubicacion);
$("#asignadoi").val(respuesta.asignado);
$("#subcategoriai").val(respuesta.subcategoria);
$("#estadoi").val(respuesta.estado);
$("#actividadi").val(respuesta.actividad);
$("#sistemaoi").val(respuesta.sistemao);
$("#marcai").val(respuesta.marca);
$("#modeloi").val(respuesta.modelo);
$("#seriali").val(respuesta.serialp);
$("#placai").val(respuesta.placa);
$("#serialcargadori").val(respuesta.serialcargador);
$("#serialbateriai").val(respuesta.serialbateria);
$("#velocidadprocesadori").val(respuesta.velocidadprocesador);
$("#rami").val(respuesta.ram);
$("#discoduroi").val(respuesta.discoduro);
$("#ipi").val(respuesta.ip);
$("#lani").val(respuesta.lan);
$("#wlani").val(respuesta.wlan);
$("#activirusi").val(respuesta.antivirus);
$("#observacionesi").val(respuesta.observaciones);
$("#licenciaos").val(respuesta.licenciaos);
$("#modalInv").modal();
}).fail(function(r){
alert(r);
});
}
with this javascript code I show the fields that are stored in the database by the id.
Then I do not know how I could show the image with the address stored in the database, since I show the information of each of the fields correspond to a row in the bd.