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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:31:29+00:00 2026-06-16T01:31:29+00:00

I am writing a small script that will query a database for a title

  • 0

I am writing a small script that will query a database for a title and whilst you enter your title it brings back suggestions.

I have found an example and managed to create one as below:

<head>
<title>Match Form/title>
<script type="text/javascript" src="jquery.js"></script>
<script type='text/javascript' src='jquery.autocomplete.js'></script>
<link rel="stylesheet" type="text/css" href="jquery.autocomplete.css" />
<script type="text/javascript">
$(document).ready(function() 
    {

        $("#course").autocomplete("get_title_list.php", {

            width: 260,
            matchContains: true,
            mustMatch: true,
            selectFirst: false
        });
        $("#course").result(function(event, data, formatted) {
            $("#course_val").val(data[1]);
        });
    });

</script>
</head>

That then works and allows to print out my result on the page, my next task is to have multiple text boxs along multiple titles and allow someone to search the database and then return the results to the allocated box.

I know id need to assign each box an ID and then select that id in the jquery which is where i am struggling.
Any help would be greatly appreciated!

  • 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-16T01:31:30+00:00Added an answer on June 16, 2026 at 1:31 am

    Instead of an ID, change the text boxes to classes. Something like this should work with the boxes having the class “course”:

         $(".course").autocomplete("get_title_list.php", {
            width: 260,
            matchContains: true,
            mustMatch: true,
            selectFirst: false
        });
        $(".course").result(function(event, data, formatted) {
            $(this).next(".course_val").val(data[1]);
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing a small Ruby script that will run in a CLI. To
I'm writing a small script in groovy, that takes items from source database, then
I'm writing a small script that will match a shoe size from a shoe
I am writing a small script for watchr that runs my PHP unit tests.
So, I'm writing a chunked file transfer script that is intended to copy files--small
I'm writing a small C application that launchs a Matlab script (.m file). I
I'm writing a small shell script that needs to reverse the lines of a
I am writing a web script for a small online documents management company that
I currently have a small Python script that I'm using to spawn multiple executables,
I'm writing a script that will combine and minify requested CSS files and then

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.