Linked Questions
77 questions linked to/from Get selected text from a drop-down list (select box) using jQuery
53
votes
5
answers
126k
views
Get text of the selected option with jQuery [duplicate]
I have a select box with some values. How do I get the selected options text, not the value?
<select name="options[2]" id="select_2">
<option value="">-- Please Select --</option&...
8
votes
3
answers
14k
views
jQuery get the value from selectbox by its text [duplicate]
I have a select box like this:
<select id="year">
<option value="1">1 Year</option>
<option value="2">2 Years</option>
<option value="...
6
votes
5
answers
24k
views
Get the value of select tag jQuery [duplicate]
I have a code like
<select id="sel1">
<option label="l1" value="1">Cool</option>
<option label="l2" value="2">Hot</option>
</select>
Now I want to get ...
10
votes
2
answers
1k
views
Similar to val() but for the selected text in a select multiple? [duplicate]
Possible Duplicate:
jQuery get selected text from dropdownlist
<select id="id_deals" name="deals" multiple="multiple">
<option value="1">deal 2</option>
<option value="2"&...
3
votes
2
answers
2k
views
Can we get the slected options Text of select menu using jquery "Dynamic option values" [duplicate]
I want to show the drop value text but the thing is these values are dynamic,what is the correct way to approach,and right now only id values are coming now.
<div class="form-group">
<...
2
votes
1
answer
2k
views
jQuery alert text in option from select tag [duplicate]
I have a select code with two option. Is there a way I can use jQuery to alert me the text within the option tag of the option I have selected? Currently I have option two selected so when I use the ...
-1
votes
1
answer
410
views
Read text of selected option [materialize] [duplicate]
i'm using materialize framework.
I'm trying to implement the materialize select: https://materializecss.com/select.html
and this is a sample code:
<div class="input-field col s12">
<...
2
votes
1
answer
347
views
get selected="selected" text with jquery [duplicate]
i have this html code, how can i get the text which has selected="selected" option with jquery ?
<option selected="selected" value="1">m</option>
<option value="2">n</option&...
-5
votes
1
answer
405
views
How to get dropdownlist variables [duplicate]
I have a dropdownlist in my view which consists of true and false.
But I am storing one more value which I need to pass to controller.
@Html.DropDownListFor(x => x.DropDown, Model.DropDown, new {...
1
vote
1
answer
146
views
I am trying to get the content of a selected item in a combobox by using the following code [duplicate]
alert($("select[name="+"this.name"+"] option:selected").text());
but nothing is being returned unless I give the name of the combobox instead of calling this.name, I might be having problems with the ...
-6
votes
1
answer
142
views
Is there a way to get the value of {{org}} from this? [duplicate]
<html>
<input type="text" ng-model="selectedOrg" ng-show="!isSuperAdmin" readonly />
<select id="nameOrg" ng-model="selectedOrg" ng-change="changeOrg()" ng-disabled="!...
0
votes
0
answers
79
views
Passing SELECT Option's value and text to tags input on button click [duplicate]
I am working on a simple multi-user messaging system. There are many kinds of users and user categories on the system so I have multiple <select> inputs from which they can select the user and ...
0
votes
1
answer
76
views
how to take the name attribute (not value), then transfer it to text [duplicate]
I want to move the name attribute, to be a hidden value (not id), but ... stored in the database that is still id
<div class="form-group col-md-4">
<select name="id_cs" id="pakyu" class="...
0
votes
0
answers
21
views
DropDownList with ActionLink [duplicate]
I'm trying to replicate the answer found below:
is it posible do have Html.ActionLink inside a DropDownList Without java script?
@Html.DropDownList(
"url",
new SelectList(new[]
{
...
1
vote
0
answers
17
views
Disable submit button based on dropdown text [duplicate]
I'm trying to disable the submit button if I choose one of the dropdown menus that include the text "Trial" in it, but I can't seem to make it work right this time.
Javascript code:
function ...