I am building a simple search box. I am stuck on how to ignore case on the search function. I know there is a snippet to ignore case, what is it and where do I put it?
I'm new to programming, graphic designer turning into a dev.
Here is a bit for one product:
<input type="search" autocomplete="off" value="" placeholder="Search here..." id="search" onchange="openPage()">
<script>
function openPage() {
var x = document.getElementById("search").value;
if (x === "Oyaide") {
window.location.replace("/Products#!/oyaide/sort/manual");
}
if (x === "oyaide") {
window.location.replace("/Products#!/oyaide/sort/manual");
}
if (x === "OYAIDE") {
window.location.replace("/Products#!/oyaide/sort/manual");
}
</script>