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

  • SEARCH
  • Home
  • 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 7905579
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T10:32:34+00:00 2026-06-03T10:32:34+00:00

I have my index page INDEX.html and a PHP page TEST.php then an autosuggest

  • 0

I have my index page INDEX.html and a PHP page TEST.php then an autosuggest javascript code.

I am trying to make an auto suggest search field.

I am not getting autosuggest output.

Only NO RESULT FOUND is shown.

Someone please help me to make autosuggest shown in http://code.drewwilson.com/entry/autosuggest-jquery-plugin work.

<link href="css/autoSuggest.css" rel="stylesheet" type="text/css" />
<script src="js/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="jquery.autoSuggest.js" type="text/javascript"></script>
</head>
<body>
    <form id="form1" name="form1" method="post" action="">
        <label for="q"></label> <input style="width: 300px;" type="text"
            name="q" id="q" />
        <script type="text/javascript">  
     $(document).ready(function(){      
     $("input[type=text]").autoSuggest("test.php",{minChars: 2, matchCase: false});});  
     </script>
    </form>
</body>
</html>

and PHP looks like this:

<?php include("script/core/dbcon.php");  
 $input = $_REQUEST['q'];  
 $data = array();  
 // query your DataBase here looking for a match to $input  
 $query = mysql_query("SELECT * FROM user WHERE username LIKE '%$input%'");  
 while ($row = mysql_fetch_assoc($query)) {  
 $json = array();  
 $json['value'] = $row['id'];  
 $json['name'] = $row['username'];  
 $data[] = $json;  
 }  
 header("Content-type: application/json");  
echo json_encode($data);  
 ?>
  • 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-03T10:32:37+00:00Added an answer on June 3, 2026 at 10:32 am

    jQuery has now got an AutoComplete method which will do the same

    also you should replace

    $("input[type=text]").auto----
    

    with

    $("#q").auto-----
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this test page: http://www.problemio.com/index_new.php and I am trying to make some jQuery
I have a Php page the code for which is below, I am trying
I have a simple HTML page that when is load runs a javascript code
So I have this index.php page: <?php include main.php; ?> <html> <head> <link rel=stylesheet
I am using jQuery for a simple website and have a main page 'index.html'
I am using rails beta 3 and I have a erb page named index.html.erb
I have the following jQueryMobile page anatomy at index.html: <div data-role=page> <div data-role=header>...</div> <div
If I have a single page with many forms of existing records: index.html.haml -
I have an index page index.php , and when the user clicks on a
I have my index.php page and just afrer my header i want to include

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.