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 8751091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:58:51+00:00 2026-06-13T12:58:51+00:00

I am using this source code : http://www.htmlblog.us/jquery-autocomplete in my project but I am

  • 0

I am using this source code : http://www.htmlblog.us/jquery-autocomplete in my project but I am not able to fetch the result when I type in the autocomplete textbox.

Where am I going wrong ?

I use the following code

Javascript : (I use a separate file for this javascript and checked if this calls using alert and I am able to generate alert messages at runtime.)

jQuery(document).ready
 (
    function()
        {
                $('#CourseId').autocomplete( { url:'AutoComplete_Courses.php', minLength:2 } );                
        }
 );

Php:

<?php

echo('Your password must be at least 8 characters long');
if ( !isset($_REQUEST['term']) )
    exit;

$dblink = mysql_connect('localhost', 'root', '') or die( mysql_error() );
mysql_select_db('mydatabase');

$rs = mysql_query('select courseid, coursename, creditpoints from coursedetails where coursename like "'. mysql_real_escape_string($_REQUEST['term']) .'%" order by coursename asc limit 0,10', $dblink);

$data = array();
if ( $rs && mysql_num_rows($rs) )
{
    while( $row = mysql_fetch_array($rs, MYSQL_ASSOC) )
    {
        $data[] = array(
            'label' => $row['courseid'] .', '. $row['coursename'] .' '. $row['creditpoints'] ,
            'value' => $row['courseid']
        );
    }
}

echo json_encode($data);
flush();
  • 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-13T12:58:52+00:00Added an answer on June 13, 2026 at 12:58 pm

    Looking at the documentation for the AutoComplete plugin. It looks like you used the wrong object property.

    http://api.jqueryui.com/autocomplete/

    As you can see, there is no ‘url‘ property, use ‘source‘ instead.

    Change this line:

    $('#CourseId').autocomplete( { url:'AutoComplete_Courses.php', minLength:2 } );

    to

    $('#CourseId').autocomplete( { source:'AutoComplete_Courses.php', minLength:2 } );

    Additionally, whenever I’m having trouble with data coming from a database, I typically wrap the variable in PHP’s built-in output function var_dump() to see how PHP formatted the data.

    https://www.php.net/manual/en/function.var-dump.php

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this Dynamic Drive dropdown menu ( http://www.dynamicdrive.com/dynamicindex1/chrome/ ---- js source at http://www.dynamicdrive.com/dynamicindex1/chrome/chromejs/chrome.js
I'm notable to connect this site http://www.youm7.com/newtkarirrss.asp using curl on the server But i
Right now I am using this code: string url = http://www.google.com/search?sourceid=chrome&ie=UTF-8&q=hey&esrch=FT1; string source =
I'm using Datatables and have this jquery plugin showing in a few columns http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/
How can I get the html source code of http://www.example-webpage.com/file.html without using file_get_contents() ?
Im looking at this implementation of DCT using cuda: http://www.cse.nd.edu/courses/cse60881/www/source_code/dct8x8/dct8x8_kernel1.cu The part in question
I have downloaded the source code and using this logview to view log4net logs.
I am using vala. This is the source code that gives that compile time
I am using this code for detect the source language.. jsonObj = new JSONObject(response);
I got this traceback when trying to upload a file using put_file (source code

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.