Comments on: Search Bar with Autocomplete Search Suggestions in JavaScript https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/ CodingNepal is a blog dedicated to providing valuable and informative content about web development technologies such as HTML, CSS, JavaScript, and PHP. Thu, 09 Mar 2023 14:19:05 +0000 hourly 1 https://wordpress.org/?v=6.4.2 By: hl.fatma https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-21983 Thu, 09 Mar 2023 14:19:05 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-21983 Hello, how can I search within the site

]]>
By: Ean Behr https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-11605 Thu, 13 Oct 2022 14:49:33 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-11605 Thank you so much for creating this! It is so close to what I need for my site. However, instead of all suggestions (I’m replacing them with locations), linking to a google search for that suggestion keyword, I need them to open up a box with information about that location just below the search bar itself. What part of your code do I change and what do I change it to?

Currently, I’m using this script to toggle open and closed an info box below the search bar I have. Here is that code.

document.querySelectorAll(“.collapsible”).forEach(function(current) {

let toggler = document.createElement(“div”);
toggler.className = “toggler”;
current.appendChild(toggler);

toggler.addEventListener(“click”, function(e) {
current.classList.toggle(“open”);
}, false);

});

But because this uses li elements, I have to list all the locations (there are 64 of them) on the page. That makes for a very long page and if I display: none; to hide them, my search box no longer functions.

So, to be clear, I want to use your search box because I don’t have to list all of the suggestions below it, but I want the chosen selection to toggle open a box with data I’ve compiled either in the same html page or else as an anchor in another html file on my site. Hope that made sense.
thanks again

]]>
By: Waseem Akhtar https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-9708 Sat, 30 Jul 2022 11:03:37 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-9708 Nice…

]]>
By: Kishor https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-8943 Wed, 29 Jun 2022 11:28:38 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-8943 Bro how to make suggestions of another pages code at the bottom of website

]]>
By: Amon biswa https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-8246 Tue, 24 May 2022 04:59:59 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-8246 It can be open in folder alsoo???

]]>
By: ST https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-7690 Wed, 13 Apr 2022 20:11:53 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-7690 Create Program and easy to follow tutorial.
I was wondering how you would limit the search results to just 3 or 4 items rather than all partially matching ones?

]]>
By: Mark https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-7646 Sun, 10 Apr 2022 20:01:09 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-7646 Hi, I want to make a search bar that would send people to other sites of my website, so I put my domain name instead of google.com in the script but let’s say that I have sites that are not single words, but like 2 or 3 words, and when you do SPACE there is % by default, and I’m using dash (-) in naming my files, is there any way to do it?

Example:
mydomain.com <— that's my domain name
Now someone is looking for "Car parts" on my website, so I want search bar to send him to:
mydomain.com/car-parts
But this search bar is sending to:
mydomain.com/car%parts
And it's not working, any ideas how to solve this?

]]>
By: kkkvv https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-7549 Thu, 31 Mar 2022 16:14:54 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-7549 Good for the job boy

]]>
By: CodingNepal https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-7518 Mon, 28 Mar 2022 13:42:10 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-7518 In reply to Ram.

You have to add codes for that!

]]>
By: Ram https://www.codingnepalweb.com/search-bar-autocomplete-search-suggestions-javascript/#comment-7478 Thu, 24 Mar 2022 07:04:26 +0000 https://codingnepalweb.com/2020/10/17/search-bar-with-autocomplete-search-suggestions-in-javascript/#comment-7478 Search suggestions do not work up and down the keyboard key

]]>