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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:21:54+00:00 2026-06-04T17:21:54+00:00

I found this jQuery and I want to integrate it into my project. My

  • 0

I found this jQuery and I want to integrate it into my project. My question is how do I apply that “source”?

Because on my inputs I receive all from the database and I cannot write nothing before in html or jQuery!

Actually I use a wicket component to do auto-complete but that component is buggy because if I resize the browser, the list is not aligned below the input, and because of that I am trying to find a better way.

If anyone can hep me 🙂

var $element = $('.my-autocomplete');
var $testinput = $element.find('.my-autocomplete-input');

$testinput.autocomplete({
    minLength: 0,
    autoFocus: true,
    source: ["c++", "java", "php", "coldfusion", "javascript", "asp", "ruby"]
  });

Fiddle example: http://jsfiddle.net/CSypd/36/

Thank you!

  • 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-04T17:21:56+00:00Added an answer on June 4, 2026 at 5:21 pm

    Client Side

        $("#element _id").autocomplete({
                    source: function (request, response) {
                        $.ajax({
                            url: '@Url.Action("GetEmployeeDepartmentStuff")',  
                            //generates into a url. eg http://www.site.com/MyPage/GetEmployeeDepartmentStuff?filter=....
                            dataType: "json",
                            data: {
                                filter: request.term
                            },
                            success: function (data) {
                                response($.map(eval(data), function (item) {
                                    return {
                                        label: item.em_name,
                                        dp_Name: item.dp_Name
                                    }
                                }));
                            }
                        })
                    },
                    maxLength: 2,
                    select: function (event, ui) {                   
                        $("#Deparment").attr('value', ui.item.dp_Name);
                    }
                });
    

    Server-side

        [HttpGet]
        [CompressFilter]
        public ActionResult GetEmployeeDepartmentStuff(string filter = "")
        {
            SomeRepository repo = new SomeRepository();
            return repo.GetEmployeeDepartmentStuff(filter);   //returns a JSON result
        }
    

    Don’t know what langue you use for your server-side code, but you need to have a web method/service/something exposed that accepts the parameter “filter” (see above), or whatever else you want to send back…. also don’t forget to include the jquery libraries in your markup

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

Sidebar

Related Questions

I found this component made it with jquery, My problem it's that want to
I found this jquery plugin which does exactly what I need, but I want
I found this content expand/collapse jQuery plugin. I want to add fade-in effect to
I found this tutorial which pretty much does exactly what I want: http://webstutorial.com/jquery-popup-jquery-slide-popup/jquery Except
I found this jQuery plugin online that shows and hides divs. It's perfect for
I found this great jquery bubble script online - http://jqueryfordesigners.com/coda-popup-bubbles/ - and I want
I want to copy an existing form to another form. I found this question
I quickly tried to find the implementation in jQuery’s source, but only found this
I'm new in JQuery, I found this link: jQuery Effects and I want to
I found this question answered: jQuery Carousel How to show the Next or Previous

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.