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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:14:19+00:00 2026-06-05T06:14:19+00:00

I have a dropdown. I have a button too. I have special requirement. When

  • 0

I have a dropdown. I have a button too.
I have special requirement.

When a user click on the button, the dropdown should be expanded.

  • 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-05T06:14:23+00:00Added an answer on June 5, 2026 at 6:14 am

    While you can’t achieve exactly what you want, I came up with alternative way. When the button is clicked you can set the drop down size dynamically to the amount of items it got, causing it to “open” and show all the items.

    Then, when selecting an item you can set the size back to 1. This effectively has the same look and feel like what you want.

    Complete code for this would be:

    window.onload = function() {
        var oDDL = document.getElementById("myselect");
        oDDL.onchange = function() {
            //drop down item selected, reset size back to 1 to "close" the list:
            this.size = 1;
        };
    
        var oButton = document.getElementById("btnOpenDropDown");
        oButton.onclick = function() {
            //set size to number of items to "open" the list:
            oDDL.size = oDDL.options.length;
            oDDL.focus();
        }
    };​
    

    Live test case.

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

Sidebar

Related Questions

I have Dropdown and on click of a button, I want to display data
I have dropdown list on my page. When I click on submit button, gridview
I have this xpath: //*[@id=someId::button] Pressing it shows a dropdown list of values. Now,
I have a button <a> that should toggle a drop-down Then it should also
Hi I have a dropdown button that when you hover it, it drops down
I have a dropdown and a Icommand button in the same toolbar in ArcMap.
I have to add a Search Box with a DropDown Button for searching the
I have an options button that, when clicked on, will display a dropdown list
I have to add a search box, which has dropdown button kind (say it
How to change dropdown button in a ComboBox control (C#, Windows Forms)? I have

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.