Most voted "html-select" questions
The HTML selection widget (<select>) represents a user interface control that displays an options menu. The options within the menu are represented by elements <option>, whose values are determined by its attribute "value".</option></select>
Learn more…161 questions
Sort by count of
-
36
votes4
answers39339
viewsHow to apply readonly in a select?
I believe most of you here know the difference between readonly and disabled. Select Readonly The readonly does not apply properly to the select <select name="field" readonly="readonly">…
-
18
votes2
answers23417
viewsHow to select an option in one <select> and load related data in another?
I would like to select an option of a <select> and fill in the other <select> with related content. I will only be able to do this with the information stored in the database or has how…
-
14
votes1
answer1274
viewsSelect Multiple with dynamic operation
I have a select with 4 options. These 4 options are the number of options that will appear in a multiple select. What I want is as soon as the user selects the option of number of frequently asked…
-
13
votes3
answers512
viewsWhat is the difference between the <del> and <s> tag?
I saw about the tags <del> and <s>, say that one is to be used in texts/phrases not relevant and another to "delete" part of the text, but when using both tags the effect is the same (a…
-
10
votes1
answer2121
viewsHide default component [arrow] form select in IE
I got a problem here at IE. I am styling the select component of the form, hiding the arrow that comes by default from the browser to load an image in its place. In FF and Chrome was quiet, but in…
-
9
votes2
answers55209
viewsSet OPTION as SELECTED based on database values
I am preparing a form where I am setting the values of the fields with the database data. I’m having trouble setting the chosen option as selected to the <select/> in the code below: PHP…
-
8
votes2
answers14618
viewsSelect styling via CSS
I need to stylize the text inside the select, how to leave centered, put margins. I’m putting the class name more option and putting what I desire, but it is not working. I did so: HTML <h3…
-
7
votes2
answers175
viewsLine size of a drop box down when we click on the "down" button
I have a list of Brazilian states created with the command select/option HTML5, When I click to choose the state, 20 lines(states) appear and overtake my text box down. I want to restrict the number…
-
7
votes2
answers18567
viewsPick select selected (only picking first value)
An Alert is displayed (with the sweetalert plugin) and in that Alert has a selectwith names. After selecting the name, the person has to click the button Add, when the person clicks the function of…
-
7
votes1
answer1358
viewsHow to activate the modal through the option in a select?
Example: When I select the "Volvo" option, the modal appears... <label>Recinto</label> <select class="form-control" data-toggle="modal" data-target="#cria-recinto"> <option…
-
6
votes1
answer289
viewsHow to popular a dynamically select or checkbox using Annotations in ZF 2’s Zend Form?
I learned to do this with fixed values, example: @Annotation\Type("Zend\Form\Element\Select") @Annotation\Options({"label":"Cidade"}) @Annotation\Attributes({"options":{"1":"São Paulo","2":"Rio de…
-
5
votes1
answer276
viewsHow to integrate a select into a table?
I have a table. In Plano 1, I used the jQuery Heapbox plugin, but since I’m not good with Javascript, I didn’t know how to set it up, I would like the select heapbox in Plano 1 to have the same…
-
5
votes3
answers2742
viewsIs there a better way to insert an option in select with jquery?
I was wondering if there’s a better way to insert a option in the select with jquery. Example: <select name="municipio_evento" id="municipio_evento"> <option value=""></option>…
-
5
votes2
answers1005
viewsWhen selecting option displays div with
I have a doubt, as I know nothing of PHP, i would like someone to help me how to assemble or implement a Jquery that I found. In my case there are 2 selects, one who would be called Estado and…
-
5
votes1
answer482
viewsHow to select an option in select in a less laborious way?
I have a page called editarpublicacao.php who receives the id through GET. One of the two <select> for example contained on the page, is similar to that of companies: <select name="company"…
-
4
votes1
answer93
viewsOnselectionchanged MVC
Late, How can I call the Onselecionchanged event from a DDL using MVC? I have the following DDL: @Html.DropDownListFor(model => model.Type, ViewBag.Type as SelectList, "-- Select --", new { id =…
-
4
votes2
answers1084
viewsRead a "value" inside a "<select></select>"
How to read the values of a <select></select> using HTML5 + Javascript? Ex: <select name="tAtividades" id="cAtividades"> <option value="0" selected="selected">Selecione o…
-
4
votes1
answer605
viewsSearch for the option title using select2
I have a select element and I need to search the items (options) not only for the text, but also for the title (or any other attribute), I have already been able to put the title to appear when…
-
4
votes1
answer792
viewsChained Select: how to select Brazilian municipalities in a JSON file from the state select
EDITION In case, in the future, someone needs the jQuery version. Here is the code: //select encadeado com JSON $('#uf').on('change', function () { var estado = $(this).val(), cidade =…
-
4
votes2
answers734
viewsHow to remove "disabled" attribute from the parent select option?
I need that only in the select option that is selected the "Leader" option, it does not assign the "disabled", only in the other selects daughters. The logic is that only a user can be a leader, but…
-
4
votes2
answers299
viewsSelect Laravel Entering Next Record Alone
Good evening, I have a project in Laravel and I’m having the following difficulty: I have a controller that retrieves data from my database, has a variable that receives string and this string…
-
4
votes1
answer60
viewsProblem with JS and id that only work with the first id used
I’m not a professional developer, but as in any workplace, technical support does everything. I was asked to create a support page for the external sales team, where they can include information…
-
3
votes3
answers1360
viewsSelect "select" element with jquery
I created on my page one select multiple and I need to take your values in PHP in vector form, so I added [] at the end of the name. Example: <select id="selecionados[]" name="selecionados[]"…
-
3
votes3
answers8039
viewsSearch field inside select box how to do?
I would like to know if there is any way to put a search field inside a select box, because for example...I have a selectbox with +3000 thousand registered items, there arises my need to have a…
-
3
votes1
answer6222
viewsOnchange trigger in select - javascript
Hello, I have a project, and I need that, when selecting a particular item in a select, appear (or not) other items, seems to me very simple, but I was surprised by the difficulty I’m having in…
-
3
votes1
answer528
viewsValue attribute of options in select are not set correctly
I need to go through an element select on a page HTML placing the elements option within it. I can already do that, the problem is that in the attribute value of those option should receive the…
html ajax angularjs html-select html-optionasked 8 years, 9 months ago Giancarlo Abel Giulian 3,999 -
3
votes1
answer861
viewsHow do SELECT not allow selecting an option already selected in another select?
How to make it select don’t allow that the "Leader" option is not duplicate, because in my business rule only one user can be a leader. I thought the following: Assuming I have 3 selects. If I…
-
3
votes1
answer80
viewsHow do I have at most one selected leader in all selects?
How do I make to when I select the Leader option, the javascript do not allow another function to be selected (multiselect)? The scenario is as follows: Each select represents the functions of each…
-
3
votes1
answer113
viewsDoes my Select custom with Fontawesome not open when you click the arrow?
I made that select customized using FontAwesome, but it doesn’t open when you click on the arrow. Follows code referring to image above: .x { width: 50%; background-color: #fefefe; border-radius:…
-
2
votes6
answers16533
viewsHow to mount the HTML of a "select" via PHP, using data from DB
I’m having trouble properly assembling a <select> within PHP, with data returned by mysqli. I tried this way: <?php $con = new mysqli("localhost", "root", "senha","bancodedados" ) or die…
-
2
votes2
answers903
viewsCopy a selected option from a select Multiple to another select Multiple with jquery
I want to copy a option or more options’s selected from a select multiple to another select multiple with jquery. <select id='cursos' multiple> <option selected>curso 1</option>…
jquery html-select html-option selecteditemasked 10 years, 1 month ago Diego Filipe Pedro Santos 531 -
2
votes1
answer115
viewsChrome auto page scrolling to select Multiple with selected option
When using the attribute multiple, the page when loaded, scrolls to the last <select/> containing a option with the attribute selected: Example in Jsfiddle <p>No Google Chrome a página…
-
2
votes0
answers37
viewsChange option of a select via javascript
I need to develop a function. Has a menu with some links. By clicking on a link I need the options <option> of a <select> alter. The data of this <select> is coming straight from…
-
2
votes2
answers697
viewsAttribute "Multiple" of <select> tag does not work
Attribute multiple tag <select> does not work, it is only possible to select a single option. I am using Chrome. <h4>From</h4> <div> <select name="sites-list" size="7"…
-
2
votes2
answers5761
viewsAngularjs ng-options: Use object property as value instead of array index
In the code below, Angularjs ng-options renders the value but records the position in the array and not the value. I get the following json: [{"iduniforme":1, "nomeuniforme":"Uniforme 5 itens",…
-
2
votes2
answers2862
viewsIs it possible to create a title for the "select" tag without it being part of the options?
I have a question about the "select" tag, if it is possible that it has a visible title without being part of the options?
-
2
votes1
answer592
viewsSelect component disabled and selected angular value
I have the following situation I have a municipality select component <div class="form-group col-md-4"> <label>Entidade:</label> <select ng-model="distrito.entidade.idEntidade"…
-
2
votes2
answers3741
viewsTake a select value at the angle
Good morning! I need to take a value from one select to pass the value to the other, but I am new in angular and html... Code of the select: <div class="col-md-3"> <select…
-
2
votes1
answer758
viewsHow to mount an array of selected select items in html and scroll through it to organize items in javascript?
I have the code: var associar = $("#associar"); var desassociar = $("#desassociar"); var permissoes = $("#permissoes"); var minhasPermissoes = $("#minhasPermissoes"); associar.click(function() { var…
-
2
votes1
answer691
viewsHow to get values from two html selects in javascript?
Basically I have the code below: var associar = $("#associar"); var desassociar = $("#desassociar"); var permissoes = $("#permissoes"); var minhasPermissoes = $("#minhasPermissoes"); var gravar =…
-
2
votes4
answers344
viewsConvert a Select with 2 option HTML to 2 Buttons
Context: Daily access a site several times during the day, of which before effectively entering, besides informing user and password, I have to select the type of access between the 2 existing, I…
-
2
votes1
answer898
viewsng-options "Selected" does not work
I am using the ng-options function and it is listing correctly, only it is not showing the value marked as default: selected Code: <select class="form-control"…
-
2
votes1
answer323
viewsHow do I perform a text search and select tag together?
I’m here because I’m having trouble doing a search like any other with <input text> and "search" button only with the tag <select> where they contain in each <option> to value…
-
2
votes1
answer408
viewsCreating a SELECT based on another SELECT
I am using a SELECT that automatically updates the page after it is selected. I created another SELECT to work based on the previous SELECT, however, although I see the right amount of registration,…
-
2
votes1
answer923
viewsSelect with Laravel foreign key
Hello, I managed to solve a foreign key problem just now and came across a second, I have no idea how to recover in a select in the view the data from another table. If anyone could give me a simple…
-
2
votes3
answers851
viewsAdd a title to the SELECT tag (without the "Selected disabled" option) without it appearing in the options?
How do I add a title to select that it appears in the options and disappears when selecting? I know it looks like a duplicate, but the problem is I haven’t found what I’d like exactly, option…
-
2
votes1
answer347
viewsChange the HTML attribute in the option with JQUERY
I’m trying to change the value of the select with the option to "disabled" but only when the user clicks the input field. See the image to understand better: I want to exactly leave disabled the…
-
2
votes1
answer1035
viewsSelect Multiple with jQuery Chosen
I have a class Client, and a class System Man client may have more than one system, and a system, may have more than one client. I have a select Multiple capo, in my edit view, which loads the…
-
1
votes2
answers1096
viewsChange the value of a select in Cakephp
I’m making a system, and there’s a part of it that needed a select. The names inside the select are being displayed, but the data saved in the database (mysql) is relative to the 'id' field, and…
-
1
votes1
answer130
viewsJSF Prime Faces Menu Selector
I am trying to use a Primefaces type selector for my project. Its functionality is the following: I want to register an object of the type Discipline in DB, hence I need the selector to include an…
html-selectasked 10 years, 3 months ago Adelino Santos 11