add search in Priom db

This commit is contained in:
Ahmedvolga 2024-10-03 13:12:35 +03:00
parent 3a803d0af8
commit b3931c7ed4
1 changed files with 16 additions and 1 deletions

View File

@ -679,7 +679,22 @@ SerialNumber.addEventListener("submit", (e) => {
console.error(error);
$('#searchText').text(error.message)
$('.form-btn').css('background-color', 'orangered')
});
});
fetchData(keyboardLayoutSwitch(serial.value), 'searchpriom').then(data => {
console.log(data); // The response body
for (var key in data) {
if (data.hasOwnProperty(key)) {
console.dir(data[key]);
$('.repeatedx').append(buildHtmlTable([data[key]]))
}
}
})
.catch(error => {
console.error(error);
$('#searchText').text(error.message)
$('.form-btn').css('background-color', 'orangered')
});
}