i'm trying to display json data loaded from php in a bootstrap form with one line but not working with me
here is JAVASCRIPT
var req_='getprosp&id='+trdata.IDP;
$.ajax({
type: "GET",
url: "lib/read.php?req="+req_,
contentType: "application/json; charset=utf-8",
global: false,
async: true,
dataType: "json",
success: function(data) {
for (var i in data) {
$('input[name="'+i+'"]').val(data[i]);
}
//$.each(data, function(key, val) {console.log(val) });
}
});
thanks for helping