html-select Questions
14
Solved
Maybe this is an easy question, maybe not. I have a <select> box where I hardcode the width to 120px:
<select style="width: 120px">
<option>REALLY LONG TEXT, REALLY LONG TEXT...
Yorker asked 16/11, 2008 at 16:10
5
Solved
How do you get the currently selected <option> of a <select> element via JavaScript?
Uptrend asked 21/7, 2010 at 16:42
4
Solved
I would like to remove from the dropdown of variations in WooCommerce product page following "option":
I found plenty of, apparently not working codes which should do the job. Probably outdated t...
Ronnyronsard asked 4/7, 2018 at 22:41
7
Solved
The code:
var newSelect=document.createElement('select');
index=0;
var optn = document.createElement("option");
//langArray is an array that contains different items..the size
//is not fixed for ...
Universalism asked 6/7, 2011 at 18:13
5
In the snippet below, I have two methods to choose an item: input with datalist and traditional select with options.
The select element keeps the option values hidden, and we're still able to get ...
Prebend asked 22/8, 2016 at 18:32
16
Solved
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>2...
Photoluminescence asked 17/5, 2013 at 7:44
35
Solved
I thought that adding a "value" attribute set on the <select> element below would cause the <option> containing my provided "value" to be selected by default:
<select name="hall...
Diehl asked 19/8, 2010 at 1:10
5
I have a HTML dropdown select menu with first option is disabled. I would like to show that default disabled option in gray color, but once I selected another value, I would like this appear as blu...
Collaborate asked 3/3, 2014 at 13:4
3
Solved
How can I post values from a multiple select in a form? When I hit submit none of the selected values are posted.
<form id="form" action="" method="post">
<div>
<select id="inscom...
Zack asked 23/7, 2012 at 16:32
9
Solved
I'm trying to create a button that can select next option.
So, i have a select (id=selectionChamp) with several options, an input next (id=fieldNext), and i try to do that :
$('#fieldNext').click...
Hemorrhoidectomy asked 19/7, 2012 at 8:11
2
Solved
I am creating the following svg element and structure:
<svg width="135" height="15">
<rect width="15" height="15" fill="#ffffe5" x="0" y="0"></rect>
<rect width="15" height=...
Augury asked 5/10, 2017 at 23:34
7
Solved
<!DOCTYPE html>
<html>
<script>
function getValue()
{
var x = document.getElementById("sel");
for (var i = 0; i < x.options.length; i++) {
if (x.options[i]....
Miterwort asked 8/10, 2012 at 5:42
19
Solved
I have a drop-down list with known values. What I'm trying to do is set the drop down list to a particular value that I know exists using jQuery.
Using regular JavaScript, I would do something lik...
Roberto asked 31/1, 2009 at 19:39
17
Solved
How do you add a separator between options in a <select> tag? Like so:
New Window
New Tab
-----------
Save Page
------------
Exit
Fairleigh asked 22/5, 2009 at 17:58
4
Solved
I'm using Select2 4.0. I have a list of options, some of which are "deleted" and I want to signify which are which. My select element is like this:
<style>.deleted { color: red; }</style&...
Borstal asked 25/11, 2015 at 21:4
5
I'm using HTMX and would like to have a <select> form field that automatically loads a specific URL into a <div>.
The "value select" example is similar to this idea, but it in...
Mariner asked 20/6, 2021 at 1:44
29
Solved
I have a select field with some options in it. Now I need to select one of those options with jQuery. But how can I do that when I only know the value of the option that must be selected?
I have th...
Picardi asked 12/11, 2012 at 12:16
31
Solved
My code works in IE but breaks in Safari, Firefox, and Opera. (big surprise)
document.getElementById("DropList").options.length=0;
After searching, I've learned that it's the length=0 that it do...
Hoenack asked 29/7, 2010 at 15:57
15
Solved
$('#mySelectBox option').each(function() {
if ($(this).isChecked())
alert('this option is selected');
else
alert('this is not');
});
Apparently, the isChecked doesn't work. SO my question is ...
Drillstock asked 18/4, 2012 at 16:18
12
Solved
I have option menu like this:
<form name="AddAndEdit">
<select name="list" id="personlist">
<option value="11">Person1</option>
<option value="27">Person2</opti...
Doolittle asked 6/6, 2012 at 9:29
10
Solved
Suppose a list of options is available, how do you update the <select> with new <option>s?
Cymatium asked 26/11, 2009 at 4:14
42
Solved
I'm using placeholders for text inputs which is working out just fine. But I'd like to use a placeholder for my selectboxes as well. Of course I can just use this code:
<select>
<option ...
Cornett asked 27/4, 2011 at 13:39
8
Solved
My problem is HTML and CSS related. I have a hierarchy type structure that I want to display inside a list. The hierarchy contains Countries, States and Cities (it is three levels deep).
I want to...
Ecchymosis asked 18/7, 2009 at 5:28
2
Solved
I need some help with jquery if condition.
I've been searching and testing for hours, any help would be great !!!
I get this HTML code:
<label id="label1" for="date_from">Value:</label>...
Basaltware asked 24/7, 2012 at 11:14
23
Solved
Suppose I have a drop-down list like:
<select id='list'>
<option value='1'>Option A</option>
<option value='2'>Option B</option>
<option value='3'>Option C<...
Dowski asked 13/10, 2008 at 4:6
1 Next >
© 2022 - 2024 — McMap. All rights reserved.