anishtulsyan22
Coder
Hi All,
My code is as follows:
function show_Suggestions_first_product(list) {
let listData;
if (!list.length) {
userValue = inputBox.value;
listData = '<li>' + userValue + '</li>';
} else {
listData = list.join('');
}
console.log(listData);
// This Line of code is not working. Need to work on innerHTML section.
// document.querySelectorAll("first_autocomplete_box").innerHTML = listData;
suggbox.innerHTML = listData;
// console.log(suggbox.innerHTML);
}
In this code , I am getting the data properly in the list parameter. but in the last line of the code, where I am trying to use:
suggbox.innerHTML = listData;
In this line of code innerHTML does not seems to work.
Any help is appreciated.
Thanks in Advance.
My code is as follows:
function show_Suggestions_first_product(list) {
let listData;
if (!list.length) {
userValue = inputBox.value;
listData = '<li>' + userValue + '</li>';
} else {
listData = list.join('');
}
console.log(listData);
// This Line of code is not working. Need to work on innerHTML section.
// document.querySelectorAll("first_autocomplete_box").innerHTML = listData;
suggbox.innerHTML = listData;
// console.log(suggbox.innerHTML);
}
In this code , I am getting the data properly in the list parameter. but in the last line of the code, where I am trying to use:
suggbox.innerHTML = listData;
In this line of code innerHTML does not seems to work.
Any help is appreciated.
Thanks in Advance.