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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T14:17:16+00:00 2026-05-23T14:17:16+00:00

I am using jquery autocomplete (1.8) to fill tags just like explained in http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/

  • 0

I am using jquery autocomplete (1.8) to fill tags just like explained in http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/.

What i need is after selection of LI item from drop down menu, that item should be removed from list.

In select section of autocomplete I tried to get current LI using diff method like

$(this).get(0).tagname //which return undefined 
e.target.id //which return id of textfield to which autocomplete is bound
  • 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-23T14:17:17+00:00Added an answer on May 23, 2026 at 2:17 pm

    Assuming you are doing exactly as in the tutorial you linked to:

    1. Before attaching the autocomplete, create an empty array to hold items that should be ignored (var ignored=[];). You could put it in the global scope to ensure it will be accessible anywhere (put before $(function() { ...).
    2. On the definition of the source callback (which formats the results), replace this

      //process response
      $.each(data, function(i, val){
          suggestions.push(val.name);
      });
      

      with this:

      //process response
      $.each(data, function(i, val){
          if(ignored.indexOf(val.name) == -1) {
              suggestions.push(val.name);
          }
      });
      
    3. Then, inside the select callback, add the selected item’s value to the ignored array:

      ignored.push(ui.item.value)
      
    4. You’ll probably want to ‘un-ignore’ the item if the user clicks on a remove link. Inside the remove handler definition, on the first line, add this:

      var text = $(this).parent().find('a').remove().end().text();
      var position = ignored.indexOf(text);
      if(position != -1) {
          ignored.splice(position, 1);
      }
      // rest of the original code below...
      
    • 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 <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js'></script> Everything is working Ok., but now
So I am using jquery.autocomplete.js, demo can be found here http://www.ajaxdaddy.com/demo-jquery-autocomplete.html I want to
I'm using the jQuery Autocomplete plugin from http://docs.jquery.com/Plugins/Autocomplete on IE7 and it's not releasing
I am using jQuery UI Autocomplete with ASP.NET like this : First I am
I am using jQuery auto-complete. I have download this script from http://code.google.com/p/jquery-autocomplete/ . I
I am using jQuery autocomplete from here : http://www.pengoworks.com/workshop/jquery/autocomplete.htm $(#TestTextbox).autocomplete( '<%= Url.Action(LookupAction) %>', {
What's benefit using jQuery Autocomplete over Ajax AutoCompleteExtender? Can some one explains the benefits
My app already has a completed menu using jquery.menu.js found at http://wiki.jqueryui.com/Menu . I'm
Im using jquery autocomplete can I pass extraParams to webservice in asp.net ? and
I'm using jQuery autocomplete which makes a UL with items like: <li class=ui-menu-item role=menuitem>

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.