Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8923385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:06:13+00:00 2026-06-15T07:06:13+00:00

How could it be done that I make an Ajax Search after the user

  • 0

How could it be done that I make an Ajax Search after the user typed in 3 characters?
I’m not that expert in javascript, but here’s my HTML file so far:

<form>
<input type="text" id="searchField" name="searchField" placeholder="...">
</form>

<script>
    $('#searchField').searchbox({
    url: 'components/search_ajax.php',
    param: 'q',
    dom_id: '#searchResult',
    delay: 0,
    loading_css: '#spinner'
    });
</script>

At the moment the search is called just when the backspace button is pressed (then all of my database entries are represented because there is a match-search with no character).

Thanks in advance!
Regards.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T07:06:15+00:00Added an answer on June 15, 2026 at 7:06 am

    Firstly, you’ll need to let us know which plugin you’re using, I have a feeling it is this, if it is, change:

    process: function(terms) {
    

    to

    process: function(terms) {
      if(terms.length < 3) return;
    

    But you should also limit this on your server side, otherwise I can just go directly to your script to view all entries. You can do this at the top of your php file with:

    if(strlen(trim($_GET['q'])) < 3) return; // only basic, would need more checks
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I don't think that this could be done in C#, but posting this just
I would like the height*width of a remote image. Could that be done with
I have some code that I know could be nicer if it's done in
The following script works for me, but I wonder if it could be done
Could this be done with javascript/jQuery : <div class=number>99,123,123</div> <div class=number>123,123,123</div> <div class=number>1,123,123,123</div> <div
How can I make a table sortable using javascript without loading data via AJAX?
If you've done any serious research into search API's, you know that most of
I know this could be done manually with some hardcoded Linq Joins. However, I
I am sure someone has this done already, and was hoping someone could share
It doesn't seem to be a different requirement but just couldn't get it done,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.