Questions tagged [drop-down-menu]
A GUI element, similar to a combobox and a list box, which allows the user to choose one value from a list. When a drop-down list is inactive, it displays a single value. When activated, it displays (drops down) a list of values, from which the user may select one.
1,858
questions
374
votes
24
answers
1.3m
views
How to style the option of an HTML select element?
Here's my HTML:
<select id="ddlProducts" name="ddProducts">
<option>Product1 : Electronics </option>
<option>Product2 : Sports </option>
</select&...
2530
votes
35
answers
2.4m
views
Get selected text from a drop-down list (select box) using jQuery
How can I get the selected text (not the selected value) from a drop-down list in jQuery?
1413
votes
36
answers
2.3m
views
jQuery Get Selected Option From Dropdown
Usually I use $("#id").val() to return the value of the selected option, but this time it doesn't work.
The selected tag has the id aioConceptName
html code
<label for="name">...
1248
votes
43
answers
851k
views
How to make Twitter Bootstrap menu dropdown on hover rather than click
I'd like to have my Bootstrap menu automatically drop down on hover, rather than having to click the menu title. I'd also like to lose the little arrows next to the menu titles.
273
votes
11
answers
843k
views
How to get multiple selected values of select box in php?
I have a html form which has a select list box from which you can select multiple values because its multiple property is set to multiple. Consider form method is 'GET'. The html code for the form is ...
41
votes
4
answers
67k
views
Populating cascading dropdown lists in JSP/Servlet
Suppose I am having three dropdownlist controls named dd1, dd2 and dd3. The value of each dropdownlist comes from database. dd3's value depends upon value of dd2 and dd2's value depends on value of ...
109
votes
13
answers
400k
views
Change Select List Option background colour on hover
Is it possible to change the default background color of a select list option on hover?
option:hover {
background-color: red;
}
<select id="select">
<option value="1">One</...
90
votes
14
answers
170k
views
Can I open a dropdownlist using jQuery
For this dropdownlist in HTML:
<select id="countries">
<option value="1">Country</option>
</select>
I would like to open the list (the same as left-clicking on it). Is this ...
395
votes
40
answers
486k
views
Avoid dropdown menu close on click inside
I have a Twitter Bootstrap dropdown menu. As all Twitter Bootstrap users know, the dropdown menu closes on click (even clicking inside it).
To avoid this, I can easily attach a click event handler on ...
92
votes
27
answers
101k
views
Dropdownlist width in IE
In IE, the dropdown-list takes the same width as the dropbox (I hope I am making sense) whereas in Firefox the dropdown-list's width varies according to the content.
This basically means that I have ...
277
votes
16
answers
648k
views
Get selected option text with JavaScript
I have a dropdown list like this:
<select id="box1">
<option value="98">dog</option>
<option value="7122">cat</option>
<option value="142">bird</option>
</...
304
votes
12
answers
482k
views
How do I add options to a DropDownList using jQuery?
As the question says, how do I add a new option to a DropDownList using jQuery?
Thanks
5
votes
3
answers
30k
views
Message: Element <option> could not be scrolled into view while trying to click on an option within a dropdown menu through Selenium
I am trying to select a drop down menu and choose an option. I am using the latest version of Selenium, the latest version of Firefox, the latest version of geckodriver, and the latest version of ...
27
votes
7
answers
119k
views
How to make a pure css based dropdown menu?
I am looking horizontal dropdown menu pure css based and browser compatible....
i am looking like mentioned below example
145
votes
9
answers
540k
views
How to set a selected option of a dropdown list control using angular JS
I am using Angular JS and I need to set a selected option of a dropdown list control using angular JS. Forgive me if this is ridiculous but I am new with Angular JS
Here is the dropdown list control ...
47
votes
2
answers
164k
views
Drop-down menu that opens up/upward with pure css
I've created a dropdown menu with pure CSS and I've gotten it to a place that I like except I want it to be "drop-up" not "drop-down" since the menu bar is going at the bottom of the layout. What I ...
76
votes
10
answers
306k
views
Change color and appearance of drop down arrow
I want to change the default appearance of the arrow of a dropdown list so that looks the same across browsers. Is there a way to override the default look and feel of the drop down arrow using CSS or ...
96
votes
10
answers
212k
views
How to select/get drop down option in Selenium 2
I am converting my selenium 1 code to selenium 2 and can't find any easy way to select a label in a drop down menu or get the selected value of a drop down. Do you know how to do that in Selenium 2?
...
378
votes
16
answers
766k
views
How to remove the default arrow icon from a dropdown list (select element)?
I want to remove the dropdown arrow from a HTML <select> element. For example:
<select style="width:30px;-webkit-appearance: none;">
<option>2000</option>
<option&...
34
votes
6
answers
126k
views
Pure CSS multi-level drop-down menu
I haven't done a lot of work with multi-level, pure CSS drop-down menus before, but I'm now looking for the cleanest possible method that is out there. When I've searched for this online I've found a ...
21
votes
6
answers
9k
views
Angular 2+ and Observables: Can't bind to 'ngModel' since it isn't a known property of 'select'
EDIT: Updated Plunkr: http://plnkr.co/edit/fQ7P9KPjMxb5NAhccYIq?p=preview
this part works:
<div *ngFor="let entry of entries | async">
Label: {{ entry.label }}<br>
Value: {{ entry....
383
votes
18
answers
871k
views
How can I set the value of a DropDownList using jQuery?
As the question says, how do I set the value of a DropDownList control using jQuery?
4
votes
1
answer
4k
views
Is there a simple way of populating dropdown in this Access Database schema?
I have 3 tables which look like this:
Location Node Sektor
----- ------- -------
PK: ID - Autonumber PK: ID - Autonumber PK: ID - ...
145
votes
4
answers
235k
views
Android custom dropdown/popup menu
How do I do a custom dropdown/popup menu anchored to a button?
I need it to work like the popup menu (anchored to a view), and do something when I click an item from the menu.
How do I add items to ...
54
votes
10
answers
159k
views
How can I limit the visible options in an HTML <select> dropdown?
How can I limit the number of shown options in an HTML <select> drop down?
For example:
<select>
<option value="1">1</option>
<option value="2">2</option&...
39
votes
9
answers
88k
views
Keep Bootstrap Dropdown Open When Clicked Off
If the dropdown is visible, and I click outside the dropdown it closes. I need it to not close.
From the documentation:
When opened, the plugin also adds .dropdown-backdrop as a click area for ...
3
votes
1
answer
26k
views
Filling HTML <select> dropdown list in JSP with values fetched from database in Servlet
I have a database flights_DB containing a table called Passengers. Each passenger is uniquely identified by his passport number.
I would like to create a drop-down list containing all the passport ...
170
votes
26
answers
266k
views
How can I close a dropdown on click outside?
I would like to close my login menu dropdown when the user click anywhere outside of that dropdown, and I'd like to do that with Angular2 and with the Angular2 "approach"...
I have implemented a ...
65
votes
12
answers
54k
views
Dropdownlist control with <optgroup>s for asp.net (webforms)?
Can anyone recommend a dropdownlist control for asp.net (3.5) that can render option groups? Thanks
20
votes
2
answers
33k
views
Word wrap options in a select list
Is it possible to wrap long options within a select list?
I have a dynamic select list, and some of the options are pretty lengthy. I'd like options that are too long to wrap to the next line. Beyond ...
16
votes
8
answers
220k
views
Drop-down box dependent on the option selected in another drop-down box
I have 2 different SELECT OPTION in a form.
The first one is Source, the second one is Status. I would like to have different OPTIONS in my Status drop-down list depending on the OPTION selected in ...
177
votes
14
answers
458k
views
How to use jQuery to select a dropdown option?
I was wondering if it’s possible to get jQuery to select an <option>, say the 4th item, in a dropdown box?
<select>
<option></option>
<option></option>
...
95
votes
19
answers
214k
views
Adding a slide effect to bootstrap dropdown
I'm using bootstrap, and I'd like to add animation to a dropdown. I want to add an animation to it, slide down and back up when leaving it.
How could I do this?
Things I tried:
Changing the Js drop ...
272
votes
14
answers
740k
views
How to create a drop-down list?
How can I create a drop-down list? I've tried a ScrollView but it's not exactly what I need.
59
votes
10
answers
301k
views
dropdownlist set selected value in MVC3 Razor
Here is my model:
public class NewsCategoriesModel {
public int NewsCategoriesID { get; set; }
public string NewsCategoriesName { get; set; }
}
My controller:
public ActionResult ...
32
votes
13
answers
317k
views
How do I set the selected item in a drop down box
Is there any way to set the selected item in a drop down box using the following 'type' code?
<select selected="<?php print($row[month]); ?>"><option value="Janurary">January</...
102
votes
9
answers
240k
views
How to add Drop-Down list (<select>) programmatically?
I want to create a function in order to programmatically add some elements on a page.
Lets say I want to add a drop-down list with four options:
<select name="drop1" id="Select1">
<...
75
votes
11
answers
72k
views
ListItems attributes in a DropDownList are lost on postback?
A coworker showed me this:
He has a DropDownList and a button on a web page. Here's the code behind:
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
...
67
votes
7
answers
171k
views
jQuery drop down menu closing by clicking outside
I am developing a simple dropdown menu with jQuery . When a user press on a trigger area, it will toggle the dropdown area. My question is how to have a click event outside of the dropdown menu so ...
17
votes
3
answers
80k
views
Multi selection spinner in android without AlertDialog
i want the same as this link https://www.gorecess.com/ first spinner . multi selection spinner in android with checkbox .Show the spinner in dropdown. anyone know answer...
7
votes
1
answer
11k
views
How to populate second dropdown based on selection of first dropdown using jQuery/AJAX and PHP/MySQL?
I am trying to create a dynamic set of dropdown boxes, using jQuery/AJAX and PHP/MySQL. The first dropdown box will be populated when the page loads based on values from a database. The second ...
87
votes
10
answers
155k
views
There is no ViewData item of type 'IEnumerable<SelectListItem>' that has the key 'xxx'
There are a couple of posts about this on Stack Overflow but none with an answer that seem to fix the problem in my current situation.
I have a page with a table in it, each row has a number of text ...
77
votes
24
answers
86k
views
Flutter: There should be exactly one item with [DropdownButton]'s value
I am trying to create a dropdown button in Flutter. I am getting a List from my database then I pass the list to my dropdownButton everything works the data is shown as intended but when I choose an ...
29
votes
9
answers
190k
views
Selected value for JSP drop down using JSTL
I have SortedMap in Servlet to populate drop down values in JSP and I have the following code
SortedMap<String, String> dept = findDepartment();
request.setAttribute("dept ", dept);
...
22
votes
4
answers
22k
views
drop-down checkbox input in shiny
Is it possible to have a dropdown list in Shiny where you can select multiple values? I know selectInput has the option to set multiple = T but I don't like it that all selected option are visible in ...
65
votes
10
answers
39k
views
Support for optgroup in dropdownlist .NET MVC?
Continuing on from this question programmatically creating a drop down list I would like my list to have several optgroup lists too. Is this currently possible?
I know I need to pass a selectList to ...
39
votes
7
answers
187k
views
Links in <select> dropdown options
Is it possible for each dropdown options to link somewhere when selected without the need for an external button?
<select>
<option value="x">x</option>
<option value="y">y&...
26
votes
8
answers
78k
views
Sorting dropdown list using Javascript
i want to sort the drop down items using javascript,can anyone tell me how to do this.
3
votes
1
answer
6k
views
trying creating dropdown menu pygame, but got stuck
So so far here's my code:
import pygame as pg
pg.init()
clock = pg.time.Clock()
# Generating screen
w_scr = 640
h_scr = 480
size_scr = (w_scr, h_scr)
screen = pg.display.set_mode(size_scr)
# Define ...
155
votes
24
answers
451k
views
How to implement drop down list in flutter?
I have a list of locations that i want to implement as a dropdown list in Flutter. Im pretty new to the language. Here's what i have done.
new DropdownButton(
value: _selectedLocation,
onChanged: ...