Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

search box

New Here ,
Oct 29, 2018 Oct 29, 2018

Hello,

need some help, I am trying to build a search box so when someone searches for a name on our page it will find, kind of like when you search by ctrl F

does any one already have pre-existing code build?

I try using a couple of snips from bootsnip but seems it doesn't work for whatever reason

1.0K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

a simple request to your database containing the title is good enought... just think to wrap you search query by a %% pair to open  an in between word.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

you can have some more details there

https://sql.sh/cours/where/like

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

You'll need to get your content indexed into a searchable database and connect your search form to  a related search engine.  You can use Goolge's search API or if you prefer, another 3rd party service like Freefind.  Or you could buy Zoom desktop search engine.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

it is sometimes not useful to take out semi-trailers when the simple trunk of a car can be enough.... without any deterioration for the OP request, it is impressive the volume of data that mysql can manage when the text fields are simply indexed by the internal attribute on full text

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

I could be wrong but I'm willing to bet the OP's site is static HTML and he  doesn't have a MySQL database to query.  That's why I mentioned Google, Freefind and Zoom.

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

you probably right...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 29, 2018 Oct 29, 2018

Hi

I guess not explaining well..

<Moderator: Removed image as it contained personal info>

this is what I am looking for.. please see image.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

You have my answers above.  What you're attempting to do won't work in all browsers.   Here's why

Window.find() - Web APIs | MDN

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Oct 29, 2018 Oct 29, 2018

How does anyone know what name to search for - I mean what's going to happen if someone searches for 'Puff the magic dragon'?

Usually you would have a list of employee names associated with the company (that looks like what you are trying to do from your image) then have a details pages for each employee which you can link to from the list.

Or is that not what you are trying to do..........maybe just trying to search for any word?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018

In this sense, one should be taken into account that the request can also be geolocalised, or based on a profiling user system, or respond to preferences explicitly entered by the user, or take into account the Internet user's visit history...   or...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 29, 2018 Oct 29, 2018
LATEST

jQuery Search: Tipue jQuery Site Search Plugin

Paul-M - Community Expert
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines