I've uploaded some photos via ajax. then the response is the json encoded image names. I want to view images imminently after upload proccess.I've tried this:
JS:EDITED
$('#upload-form').ajaxForm({
success: function(data) {
$(".loader").hide();
$("#status").html("");
$.each(data, function(index, item) {
$("#status").append("<img src='<?php echo base_url()."assets/img/"; ?>" + item.name +"' />");
});
return false;
},
complete: function(xhr) {
$(".loader").hide();
return false;
},
error : function(xhr) {
$("#status").html(xhr.responseText);
$(".loader").hide();
}
});
but still no luck. How can I do this?