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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:50:38+00:00 2026-06-04T02:50:38+00:00

Well I just implement jquery-ui-autocomplete with VB.net in the server side, but it was

  • 0

Well I just implement jquery-ui-autocomplete with VB.net in the server side, but it was because I follow an example, does anybody could try to explain (for dummys) how it works this code ?, the part I have no idea about it is in the return (success event):

$("#kSerial").autocomplete({
           source: function (request, response) {
               dataFromServer = "";
               $.ajax({
                   type: "POST",
                   url: URL + 'regresaSeriales',
                   async: false,
                   contentType: "application/json; charset=utf-8",
                   data: "{" + "'serial':'" + request.term + "'" + "}",
                   dataType: "json",
                   success: function (msg) {

                       /*This is the part I just don't get it*/                        

                       response($.map(msg.d, function (item) {
                           return {
                               value: item.serial
                           };
                       }));

                     /*and ends here*/

                   },
                   error: function () {

                       serial = 0;

                   }

               })

           },

On my server side I return a list of “serial” objects (List (of T)) and it works fine.

I just follow an example and adapted to my server side code, but I have no idea about how it works the part of the return, I mean I understood that the “source” property accepts a callback, but can’t realize how it works the code in the success event of the ajax request.

Indeed I neither get the reason of the 2 parameters in the callback, especially the “request”, (request,response).

This is the tutorial I based my code: http://www.dotnetcurry.com/ShowArticle.aspx?ID=515

  • 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-04T02:50:40+00:00Added an answer on June 4, 2026 at 2:50 am

    It takes the response data, grabs the d object property (an array), iterates over it, and for each item in that array, creates an object with a value property of the item’s serial property.

    The $.map call puts all those objects in to an array and sends it to the response function (IIRC part of the autocomplete plugin that spits out the completions).

    The request parameter is just an object containing the search term, or “what’s in the text input”. This is described in the autocomplete overview docs.

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

Sidebar

Related Questions

Maybe I just don't know .NET well enough yet, but I have yet to
I'm just starting with The Well-Grounded Rubyist, and they gave the following example: print
Well it's late so I assume I'm just exhausted but I've been trying to
I'm trying to implement my own list class but am having trouble reversing just
Is there any library available (or well-written algorithm reference I could implement) that would
I'm trying to implement Versions in my Cocoa app. Versioning just works well, the
Well, just to keep it simple: I have a webform. On it a button
I just want to check if I understood well the way asynchronous Http request
well, I just made such a hello world non-Flex app in FlashDevelop and packaged
I just started diving into the world of Rails by reading the well known

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.