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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:20:28+00:00 2026-06-17T21:20:28+00:00

hi all i got a jquery autocomplete with source of the form: var source

  • 0

hi all i got a jquery autocomplete with source of the form:

var source = [
              {"label":"item 1", "value":1}, 
              {"label":"item 2", "value":2}, 
              {"label":"item 3", "value":3}];

all i want to do is set the autocomplete to show let say “item 1” if i give him the value 1
and show “item 2” if i give it the value 2.

all i see is option to set the auto complete by label like this:

$("#myAutoCompleteID").val("item 1") ;

i want to set the auto complete by value … something like:

$("#myAutoCompleteID").setValByValue(1)

any help?

thanks guys

  • 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-17T21:20:30+00:00Added an answer on June 17, 2026 at 9:20 pm

    why don’t you write a small function your self

    function GetLabelByValue(val){
     $.each(function(i,v){
     if(v.value === val)
      {
       return v.label;
      }
     });
    }
    $("#myAutoCompleteID").val(GetLabelByValue(1)) ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

All, I've got the following code: var site_url = 'http://localhost/website/'; jQuery(#cancel_song_choice).click(function(event){ cancel_url = site_url
I've got some JQuery which works fine. It loads all the autocomplete values, and
I've got a form that uses the jquery autocomplete UI plugin, http://jqueryui.com/demos/autocomplete/ , which
I have a select-all jquery script I got from a site (I forgot the
I've got 3 UL lists that are using sortable jquery.ui. All works great, but
I have been tinkering with the jQuery autocomplete, and I got some parts of
Lots of style-related jquery autocomplete questions (yow), but none that want to "match the
I did everything mentioned on http://volaresystems.com/Blog/post/Autocomplete-dropdown-with-jQuery-UI-and-MVC.aspx but i got nothing when i type a-z
I'm trying to make a clever contact page. I've got my jQuery animations all
i got a jquery function that controls that all the required fields of my

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.