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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T05:21:42+00:00 2026-05-18T05:21:42+00:00

I am using the jQuery Autocomplete Plugin (by Jörn Zaefferer of jQuery fame). BackEnd

  • 0

I am using the jQuery Autocomplete Plugin (by Jörn Zaefferer of jQuery fame).

BackEnd Code:

public JsonResult GetCompanyNames()
    {
        return Json(Model.CompanyNames); //returns valid JSon
    }

Relevant JS Code:

$('#CompanyName').autocomplete(['Suzuki', 'Honda', 'blah']); //This works fine
$('#CompanyName').autocomplete('/Account/Login/GetCompanyNames'); //This renders icons!

While passing a Javascript Array as url/data parameter it works fine as predicted.

But when I passed a Area/Controller/Action as parameter it shows me jQuery’s ui-icons (huh?) in the corresponding textbox!!?

Yes, I wish I could attach a screenshot. Trust me, I still can’t believe my eyes either.

While debugging, I have verified that my method returns valid JsonResult data. I’m using using: ASP.NET MVC3, jQuery 1.4.2. I have checked and found the same behaviour across Chrome 6.0, IE8 and and Firefox 3.5

UPDATE : The icons appear even before the autocomplete request returns from the server.

  • 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-18T05:21:43+00:00Added an answer on May 18, 2026 at 5:21 am

    Make sure to allow GET requests:

    public ActionResult GetCompanyNames()
    {
        return Json(Model.CompanyNames, JsonRequestBehavior.AllowGet);
    }
    

    Another tip: Use FireBug to see what’s exactly being exchanged between the client and server and any possible error messages.


    UPDATE:

    The problem comes from the fact that you need to manually parse the JSON by using the parse and formatItem functions because the plugin expects the data to be formatted in a special way:

    $('#CompanyName').autocomplete('/Account/Login/GetCompanyNames', {
        dataType: 'json',
        formatItem: function (data, i, max, value, term) {
            return value;
        },
        parse: function (data) {
            return $.map(data, function (item) {
                return { data: item, value: item, result: item };
            });
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery autocomplete plugin from jQuery website calling the controller url which return
I'm using Jorn Zaefferer's Autocomplete query plugin, http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ I have options set so it
I am using jQuery Autocomplete plugin 1.1 by Joern Zaefferer. Everything works fine on
I'm using Jorn Zaefferer's Autocomplete query plugin, http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ Everything seems to be working as
I am using Jörn Zaefferer's jquery autocomplete plugin, and I can't seem to figure
I'm using the Jörn Zaefferer's jQuery autocomplete plugin which works great, except for a
I'm using the jQuery AutoComplete plugin to pre-fill a field called 'Model' depending on
I'm using this JQuery autocomplete plugin http://www.devbridge.com/projects/autocomplete/jquery/ in my project. I followed this tutorial
Let me clarify: I'm using standard jQuery autocomplete plugin (bassistanse.de) and bind it to
I'm using the popular JQuery Autocomplete plugin below. http://jqueryui.com/demos/autocomplete/ Currently if you type 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.