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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:01:28+00:00 2026-05-27T09:01:28+00:00

I am using the mvc pattern to pull in an autocomplete. I have searched

  • 0

I am using the mvc pattern to pull in an autocomplete. I have searched around and apologize if this is a repeat question but I couldnt find my exact case which technically is very straighforward.

I have the following code:

<script type="text/javascript">
$(function() {

    $( "#search" ).autocomplete({
        source: "remote_bookmark.php?f=autocomplete",
        minLength: 3,
        select: function( event, ui ) {
        ui.a.val;
        ui.b.val;
        ui.c.val;
        ui.d.val;
        }
    });
});
</script>

this calls the remote page which calls a sql query in the model. The information is put into a multidimensional array that looks like the following in the model:

 array_push($bookmark_array, array($row['a'],$row['b'], $row['c'], $row['d'], $row['e']));

I then echo the json_encode in the remote and after looking at the documentation still dont seem to follow how I am supposed to put the information in the select:

  • 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-27T09:01:28+00:00Added an answer on May 27, 2026 at 9:01 am
    $( "#search" ).autocomplete({
        source: "remote_bookmark.php?f=autocomplete",
        minLength: 3
    });
    

    You do not need a select function unless you want to add extra functionality that is npt already there.

    Just change your php to:

    $bookmark_array = array($row['a'],$row['b'], $row['c'], $row['d'], $row['e']);
    echo json_encode($bookmark_array);
    

    And you should be all fine and dandy 🙂

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

Sidebar

Related Questions

I'm using CakePHP but it's a question about the MVC pattern. I have in
I'm using CakePHP to build an application using the MVC Pattern, but my question
So I have a desktop application designed using the MVC pattern inspired by this
I have a website ( based on JSP/Servlets, using the MVC pattern), and I
Have you tried using MVC or any other UI pattern for GWT client code.
I have an MVC-based site, which is using a Repository/Service pattern for data access.
I am using ASP.Net MVC but this probably applies to all MVC patterns in
I have got programming experience using the MVC pattern on web applications, I am
I was thinking of using mvc pattern while designing this app. How can I
I am currently building a PHP application using the MVC pattern. I have implemented

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.