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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:07:29+00:00 2026-06-12T15:07:29+00:00

So essentially, I have tried to move to a function that does the work

  • 0

So essentially, I have tried to move to a function that does the work for the source parameter in the autocomplete method, and now the script is broken. No options show up upon typing even though values are being returned by the $.get(...) request.

The HTML:

           <tr class="itemTableRow">
                <td>
                    <input type="text" class="item" name="items[]" />
                </td>
                <td>
                    <input type="range" class="quantity" min="1" max="10000" name="quantity[]" />
                </td>
                <td>
                    <select class="versionSelect"><option value="5">5</option><option value="6">6</option><option value="7">7</option></select>
                </td>
            </tr>

The Javascript:

 $(function() {

            $( ".item" ).autocomplete({
                            source: function(request, response){var data = $.get("http://mydomain.com/dev/kohana/utils/items/search?searchType=maxList&amp;term=" + request.term + "&amp;version=" + $(".item").parent().parent().children(":nth-child(3)").children("select").val()); console.log("" + data); response(data);},
                            minLength: 2
                        });
});

The resulting HTTP GET Request URL (when CP is entered in input field):

http://mydomain.com/dev/kohana/utils/items/search?searchType=maxList&term=CP&version=5

The resulting HTTP Response Body:

[{"label":"CP1031L","value":"CP1031L"},{"label":"CP1031M", "value":"CP1031M"]

I also have included the Jquery UI default stylesheet on the page, although it was working before that. I feel like I am missing something very basic with how the functional callback is supposed to work. Can anybody spot the problem? Thank you for your assistance.

  • 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-12T15:07:30+00:00Added an answer on June 12, 2026 at 3:07 pm

    You should call the response(data) on the success handler of your .get() call, like this:

    $( ".item" ).autocomplete({
                                source: function(request, response){var data = $.get("http://mydomain.com/dev/kohana/utils/items/search?searchType=maxList&amp;term=" + request.term + "&amp;version=" + $(".item").parent().parent().children(":nth-child(3)").children("select").val(), function(data) {response(data);});},
                                minLength: 2
                            });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Essentially I have a method of a class called killProgram, which is intended to
Essentially I have a script which acts as a task wrapper and emails a
Essentially I am looking to have a url query parameter persist throughout the life
We have a legacy system that is essentially a glorified telnet interface. We cannot
I have to write a program that will essentially sort nodes in a linked
Hi I have a difficult regex problem that I have tried and have a
Essentially my problem is thus; I have a MVC system that redirects all requests
I have tried everything.. GD will not enable! Essentially, I have extension_dir=C:\PHP\ext extension=php_gd2.dll I've
I have a function to load page content via ajax, essentially the function, fades
i have a gridview that is being populated ok. Now i want to enable

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.