add search in Priom db
This commit is contained in:
parent
3a803d0af8
commit
b3931c7ed4
|
@ -681,6 +681,21 @@ SerialNumber.addEventListener("submit", (e) => {
|
|||
$('.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')
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue