• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: Trying to perform a slightly different search (Timer, event listener, event dispatch?)

Resolved: Trying to perform a slightly different search (Timer, event listener, event dispatch?)

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

How I need to:
  1. First keyup on (search input) fires up search countdown timer and set timer to 1s.
  2. Every next search keyup on (search input) reset search countdown timer to 1s.
  3. When (search input) no longer updated and stay the same –
  4. Search countdown timer reached 0s and performing a search.

Why I need to (this way):
I have large database of records and using ajax method to fetch through. Every time keyup on (search input) send a request… (it’s resource waste and uncomfortable to watch how page refresh every keyup). So my way is to create “typing phase” – what I mean describe above.
Only pure JS, no libraries! Thanks.

Answer:



If you have better answer, please add a comment about this, thank you!

javascript
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: how to get and read an xml file in a zip file using xml.etree

02/04/2023

Resolved: The ‘Access-Control-Allow-Origin’ header contains multiple values ‘*, *’, but only one is allowed. cors error not resolving

02/04/2023

Resolved: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘crm.email’ doesn’t exist (Connection: mysql, SQL: select count(*) as aggregate from `email`

02/04/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.