add search in Priom db
This commit is contained in:
parent
3a803d0af8
commit
b3931c7ed4
|
@ -679,7 +679,22 @@ SerialNumber.addEventListener("submit", (e) => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
$('#searchText').text(error.message)
|
$('#searchText').text(error.message)
|
||||||
$('.form-btn').css('background-color', 'orangered')
|
$('.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