Well doing this ajax that I send to a processing form which returns an Array that brings parameters and an array of names I will leave here my example of php code;
This is an array of names which I fill with a for that I do
$nombre[]= $nuevoNombre;
$respuesta=array('IdImagen'=>$nextID,'Nombre'=>$nombre,'error'=>$dpError);
$dpResult= json_encode($respuesta);
echo $dpResult;
$.ajax({
cache: false,
url:ruta,
type:"POST",
data: formData,
contentType:false,
processData:false,
dataType: "json",
success:function(respuesta){
var res = new String(respuesta.Nombre);
for (x=0; x< res.length ;x++){
var strHTML = "<img src='media/thumbs/" +res.replace(/,/g,"")[x]+ "' width='100' height='100' alt=''>";
}
alert(strHTML);
}
});
and when I print it on the alert it returns this to me
<img src='media/thumbs/153.jpeg154.jpeg155.jpeg' width='100' height='100' alt=''>
and I would like to know if it is possible that it could come out like this
<img src='media/thumbs/153.jpeg width='100' height='100' alt=''>
<img src='media/thumbs/154.jpeg width='100' height='100' alt=''>
<img src='media/thumbs/154.jpeg width='100' height='100' alt=''>
In order to show a preview of photos that have been uploaded!
I look forward to your help and that I have already been clear on what I am asking Graciaaaaaas!