I am trying to load the respective data of an article by means of its id, from the registration form, where this information will only be visible, it will not be able to modify it. I have already tried several ways but I can not achieve my goal, someone who can help me.
onchange
of the combobox
<div class="col-md-9 ml-auto">
<label>Item Description</label>
<select onchange="displayInformation(this.value)" class="form-control" id="descriptionItem"></select>
<br>
</div>
//function
function displayInformation(numFile){
console.log(numFile);
$.ajax({
url: 'http://localhost/WareHouse/apis/receipt.php?numFile='+ numFile,
type: "GET",
success:function(data)
{
FullDates();
}
});
}
This is where I am trying to assign the information to each input
function FullDates(image,cat_name,idSub,numFile,name_category,name_sub,name_unit,name_location,
model_item,quantity,price_item,company_supplier,manufacturer,commentt,name_engineer)
{
console.log("Entre a FullDates");
console.log(numFile);
document.getElementById("imagenEditar").src = "http://localhost/WareHouse/assets/img/" + image;
document.getElementById("reciNumPart").value = cat_name+"-"+idSub+"-"+numFile;
document.getElementById("reciCategory").value = name_category;
document.getElementById("reciSubItem").value = name_sub;
document.getElementById("reciUnit").value = name_unit;
document.getElementById("reciAreas").value = name_location;
document.getElementById("reciModel").value = model_item;
document.getElementById("AllQuantity").value = quantity;
document.getElementById("reciPrice").value = price_item;
document.getElementById("reciSupplier").value = company_supplier;
document.getElementById("reciManufacturer").value = manufacturer;
document.getElementById("reciComment").value = commentt;
document.getElementById("ReciEngineer").value = name_engineer;
}