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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:03:11+00:00 2026-05-25T01:03:11+00:00

hi i am using Ajax AutoComplete for jQuery library http://www.devbridge.com/projects/autocomplete/jquery/ there are 2 demos

  • 0

hi i am using Ajax AutoComplete for jQuery library

http://www.devbridge.com/projects/autocomplete/jquery/

there are 2 demos there .

in the first demo (Ajax auto-suggest sample (start typing country name))

when you select a country from the drop down that country and a image is added to a div
like this

<div id="selection"><img alt="" src="/global/flags/small/ht.png"> Haiti</div>

the selected dropdown value is Haiti how can i do this .

i want to do this when mouse clicking on drop-down value and also when press enter on selected drop-down value .

i tried but could not think a way …………….. please help 🙁

  • 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-25T01:03:12+00:00Added an answer on May 25, 2026 at 1:03 am

    In the autocomplete-parameters you can define an onSelect callback. Add the function to change the div with the id selection. E.g.:

    $(>selector<).autocomplete({
        ...
        onSelect: function(value, data) {
            $('#selection').html('<img src="/global/flags/small/' + data + '.png" alt="" /> ' + value);
        }
        ...
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jQuery UI, specifically Datepicker and Autocomplete, as follows: <script src=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js></script> <link href=http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css
I'm referencing the jQuery autocomplete plugin code seen in this tutorial: http://net.tutsplus.com/tutorials/javascript-ajax/how-to-use-the-jquery-ui-autocomplete-widget/ The problem
I'm using django-ajax-selects , which is a freely available django app providing jquery autocomplete
What's benefit using jQuery Autocomplete over Ajax AutoCompleteExtender? Can some one explains the benefits
I'm using the jQuery AutoComplete plugin combined with ajax. Do you know how can
I am using the jQuery autocomplete plugin . Is there a way that when
I'm using the AutoComplete control from the ASP.NET AJAX Control Toolkit and I'm experiencing
Im trying to find a best practice to load usercontrols using Ajax. My first
I'm using jquery ajax to fetch data from an asp.net webservice. I'm wondering how
If you're using the Ext.js library, how does one do autocomplete in input text

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.