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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:00:32+00:00 2026-05-20T12:00:32+00:00

I have a combobox that act as autosuggestion for a search application. Search function

  • 0

I have a combobox that act as autosuggestion for a search application. Search function is getting triggered by a search button. I also want to trigger the search function either when the item in combobox is double or single clicked. Code:

 //for triggering search function from combobox(search_complex) it will be   
   something like that but i am not sure 
   search_complex.addEventListener(Event.CHANGE, search);
   search(event:Event):void{//something will come hereto use "selctedItem" to
   trigger search function}


 //search function which is working fine by pressing search button
 bt_search.addEventListener(MouseEvent.CLICK, search);
 function search(MouseEvent):void{
 currentUserbase = [];
 for (var n:int = 0; n<allUserbase.length; n++)
 { 
 for (var k:int = 0; k<allUserbase[n].complex.length; k++)
 {
 if ((allUserbase[n].complex[k].value.toLowerCase() == 
 search_complex.text.toLowerCase() || search_complex.text==""))
 {   
 currentUserbase.push(allUserbase[n]);
 }
 }
 }
 updateList();
 }//end search
  • 1 1 Answer
  • 1 View
  • 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-20T12:00:33+00:00Added an answer on May 20, 2026 at 12:00 pm

    I believe you’re on the right track. Try:

    search_complex.addEventListener(Event.CHANGE, search);
    bt_search.addEventListener(MouseEvent.CLICK, search);
    
    function search(event:Event):void
    {
      currentUserbase = [];
      for (var n:int = 0; n<allUserbase.length; n++)
      { 
        for (var k:int = 0; k<allUserbase[n].complex.length; k++)
        {
          if ((allUserbase[n].complex[k].value.toLowerCase() ==  search_complex.text.toLowerCase() || search_complex.text==""))
          {   
            currentUserbase.push(allUserbase[n]);
          }
        }
      }
    
      updateList();
    
    }//end search
    

    You should be able to get the selected item in your combobox using search_complex.selectedItem.label or search_complex.selectedItem.label depending on which property you need to use.

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

Sidebar

Related Questions

I have a ComboBox that is bound to a DataSource. I want to dynamically
I have a combobox that I don't want users adding new data too, but
I have a combobox that I want to be able to add items to
I have a combobox that is binding to an ObservableCollection of strings in an
I have a ComboBox that is databound to an ObservableCollection of strings . The
I have a combobox that passes along values in text, but they can have
I have a ComboBox that I am populating with a list of parts for
I have a combobox that has the entries of a full name, eg: John
I have a combobox that I have Enabled = false. When that is the
I have a ComboBox that has the SelectedItem bound to the ViewModel. <ComboBox SelectedItem={Binding

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.