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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:00:19+00:00 2026-05-23T18:00:19+00:00

Im currently using the JQuery UI extension for its search autocomplete. However, I need

  • 0

Im currently using the JQuery UI extension for its search autocomplete. However, I need to be able to limit the list of matches to 10. Furthermore, I also need to have a button on the bottom that will bring up the next 10 (hypothetical) matches. So far I have this as my code:

<script>
    $(document).ready(function() {
        var termTemplate = "<span class='ui-autocomplete-term'>%s</span>";

        $('input#autocomplete').autocomplete({
            source: ['johannesburg z', 'johannesburg x', 'johannesburg v','johannesburg b','johannesburg a','johannesburg q', 'johannesburg u', 'johannesburg y', 'johannesburg o', 'johannesburg p'],
            minLength: 3,
            open: function(e,ui) {

                var
                    acData = $(this).data('autocomplete'),
                    styledTerm = termTemplate.replace('%s', acData.term);

                acData
                    .menu
                    .element
                    .find('a')
                    .each(function() {
                        var me = $(this);
                        me.html( me.text().replace(acData.term, styledTerm) );
                    });

            }
        });
    });  
</script>

and the HTML

<body>
    <input id="autocomplete" />
    <input type="button" class="hello" />
</body

Iv already checked for similar solutions, but nothing seems to be working.

  • 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-05-23T18:00:20+00:00Added an answer on May 23, 2026 at 6:00 pm

    I would handle most of this server side.

    For example, have your server limit results to 10, and then output this via JSON to the client.

    With regards to a button that scrolls to the next list of results, you will need to implement something that emulates a form of pagination. The autocomplete dropdown should maintain an offset for results. Initially, the limit is obviously ten, and the offset is 0 (start of the results, depending how you ordered it on output). The button will need to request more results from the server when clicked, and ultimately pass in another GET variable (as well as term) that will represent the offset of results.

    How you implement this is up to you, and I haven’t done this before so I can’t just give you example code, but jQuery UI provides enough framework for you to get this done and based on my methodology above, it shouldn’t be too difficult.

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

Sidebar

Related Questions

I'm currently using ajax and jquery to update search results with a form that
I'm currently trying to build a filter search function using JQuery and Ajax. The
I'm currently using jQuery and am looking for a way to slide an image
I am currently testing this in Mozilla FireFox 3.0.5 using FireBug 1.3.0 with jQuery
I am currently using jquery corner for making a div round cornered. But the
I am currently using JQuery UI for several UI elements on my site. Is
I'm currently using the jquery-form-observe plugin which uses onbeforeunload to prompt the user about
I'm currently using jQuery.validate as a plugin for validation... my problem comes into play
I am currently using JQuery Ajax to retrieve and display some data as follows.
I am currently using jquery function(below) to display a block on click of a

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.