Questions tagged [html-select]

1

votes
2

answer
24

Views

Laravel: Use same column as option name and its value in select box/drop-down?

I'm trying to create a form with a select box in Laravel. View {{ Form::select('cmp_type', $cmp_types, null, $attributes = ['class' => 'form-control']) }} Controller public function showAddCompany() { $cmp_types = cmpTypes::where('status', true)->pluck('type'); return view('addCompany', compact('cmp...
siri
1

votes
4

answer
46

Views

Angular - Getting item id and value from a HTML select

I'm using Angular and AngularFire to fetch a list of clients from Firestore. I have displayed them in a HTML dropdown (select). Upon selecting an item I would like to obtain the client.id and client.name So far, this is able to get me the client ID upon selection. What I would also like to get upon...
Que
1

votes
2

answer
52

Views

Creating two Co-dependant <select> elements

Note, This question is definitely not about cascading select. That I know how to do. Please read before marking as duplicate you will see this is not a cascade it is co-dependence. I'm writing a form that includes filtering search results by year. I have used two dropdown (select) boxes for this wit...
Neil
1

votes
0

answer
184

Views

Angular4 NgFor select box with a large array

I'm working on a project in which I would like to populate a selectbox with all the cities of a certain country. The array I get from my db is about 2800 records long. When Angular renders this selectbox it takes pretty long although the data is ready for rendering very fast. Here is my html code: C...
Maarten De Weerdt
1

votes
1

answer
59

Views

glyphicon on AngularJS Dynamic Dropdown options

I am creating a web app in which i have a dropdown which looks like this and this is how i am filling the data scope.passangers = [{ Name: 'Passanger 1', Value: 1 }]; var totalPassangers = 21; for (var i = 2; i
1

votes
2

answer
504

Views

Set selected value on dynamic dropdown list

I have the below code, so the user can select the language he desire: Select Language: This is the function of the languages! function loadLanguage($lng, $units = '') { global $ms, $la, $gsValues; // always load main english language to prevet error if something is not translated in another language...
Leonidas
1

votes
2

answer
457

Views

Angular 2 dropdown list not loading since the http response is slow

I was trying to load dropdown list from http response using angular2 service. Here is my service method : categories: any; getCategories() { let subscription = this.httpclient .get(this.server_url) .subscribe((data) => { this.categories = data; console.log(this.categories); }); } Component TS cate...
debarun.datta
1

votes
2

answer
1.1k

Views

Get selected value of select inside table row not working as expected

Hello folks of Stackoverflow, i want to implement a filter for some sort of table in javascript. my text-search does work as expected, but i have some issues with getting an 'select' element with js... Some Code of it: function doSomething(){ var table, tr, td, i; table = document.getElementById('...
treav0r
1

votes
1

answer
288

Views

Simulate dropdown menu selection javascript

There is this dropdown menu on a website, which looks like: Month January February Day 1 2 Year 2005 2004 2003 Now I need to simulate a selection to this form. I use this javascript to do so: document.getElementsByClassName('month')[0].value = '1'; document.getElementsByClassName('day')[0].value = '...
Billy Bob
1

votes
0

answer
17

Views

Attempting to use either PHP(preferrably) or JavaScript for Videos

I am experiencing a project roadblock I am unable to resolve and I am seeking advice/guidance. I am controlling HTML content with PHP. My goal is to create some sort of list that the user may select an option, that has dynamically pulled the file names of the items in the folder, and display that...
Chris
1

votes
1

answer
488

Views

C# selenium - element not visible: Element is not currently visible and may not be manipulated error message

I am having trouble with selecting an option from a drop down list which is made visible by clicking on an input text box. I am using Selenium with c#. The functionality is as follows; open web page click on Destination text box this causes a destinations drop down list to be displayed select an opt...
Diren
1

votes
1

answer
714

Views

React select onChange not called when options change

I have a in my component where the list of options is filtered depending on state and is initialized with nothing. render() { this.setState({time: e.target.value})} disabled={!this.state.date} > { availableDates.filter(d => moment(d).format('YYYY-MM-DD') === this.state.date).map(d => {moment(d).for...
1

votes
0

answer
35

Views

click on option tag gets triggered even when disabled in Angular

I have a two layered select as follows: {{eachVal.property}} {{eachVal.property}} I want to disable clicking on the References when the any option from Properties is clicked. the function getPropValues() triggers the propClicked boolean flag and I can see the group being disabled, however upon clic...
Shan-Desai
1

votes
2

answer
61

Views

HTML select options are not disabled/enabled on button click as they should Javascript

I'm trying to disable options on my select element in my HTML page using javascript DOM. On button click a function should disable every option in the select, and another button should enable them again. The problem is that the first option is never disabled and also on button click the events aren'...
Filippo Momentè
1

votes
2

answer
16

Views

I'm trying to select a specific option from select with jquery

I have a select list with 4 options. What I want is to hide the submit button when I select the first option with the value='zero'. When I select the other options 'one', 'two', 'three'.... I want the submit button to be displayed. This is my first time on programming and I dont know what to do. Pl...
Dimitris T.
1

votes
1

answer
41

Views

Populate a select using ajax and json sometimes fail

I am trying to populate a Select using an ajax call that retrieve a json with the content. As far as I see, connection is working okey (using Chrome Network option I see the ajax response always contains data, this is a example of the response when the select shows nothing: [{'id':'4','value':'VALOR...
Maria
1

votes
0

answer
69

Views

Keep an empty select option if another selected

I have 3 available options in my formly form select right at the beginning. An empty option (I want to keep regardless if an options has been selected), 'Advance' and 'Arrears'. Once I select an option, the empty one disappears. I'm trying this to keep it but it doesn't work. { className: 'col-xs-3'...
LazioTibijczyk
1

votes
0

answer
235

Views

Dropdown with multiple select and can select same value multiple times

I have a drop down like page1 page2 page3 Please suggest me a frame work where we can select same value more than one time.
1

votes
1

answer
38

Views

grouped_collection_select, Devise and Rails 5.0 custom registration issue

I'm having having some issues with custom Devise registration in Rails 5. I have 3 models with the following AR associations User (Devise) belongs_to :chapter Chapter belongs_to :country has_many :users Country has_many :chapters I created a seed file for Chapter and Country and that's working fine,...
JJ McGregor
1

votes
1

answer
317

Views

Angular <select> Bound to Object Confirm Change or Revert to the Previous Value

I'm trying to achieve pretty simple behavior: revert to the previous value, if user canceled the change. Actually, I succeeded, but that cost me few hours, and I'm still unhappy with the implementation, because it's not so obvious and tricky. So, here's the template: All {{state.name}} and componen...
Halfist
1

votes
0

answer
26

Views

Aikau Select not getting filled with options

Here is my widget configuration : id: 'MY_CUSTOM_SELECT', name: 'resources/saved-research-share/js/faceted-search/SavedResearchList', config: { fieldId: 'MY_CUSTOM_SELECT_LIST', name: 'customWidget', label: msg.get('faceted.search.menu.select.saved.research.label'), scopeFormControls: false, align:...
BenjaminRivard
1

votes
0

answer
558

Views

how to create a dropdown list of radio buttons

Can anyone tell me how I can create a drop-down list which contains radio buttons as its options in angularjs. I have rammaged the net and still didn't find any solutions. Wonder how no one found the need to do this. I'd be really glad if anyone could help me out here.
Rai
1

votes
1

answer
27

Views

Setting hidden dropdown selected value causes page reload in iOS 11 safari

Here's my scenario. I'm using a bootstrap dropdown to create a fancy select menu. The actual , used for validation and form post purposes, has it's visibility set to hidden. There is corresponding script to set the selected value of the when the bootstrap dropdown link is clicked. Here's a snippet...
Adam
1

votes
2

answer
40

Views

Copy ListItems to the DropDownList Items’ ListItemCollection without using a for loop

I’m dynamically generating many DropDownList boxes (on an ASP.NET WebForm page) that allows the user to select a value between 0 to 24 from the list. The DropDownList has a ListItemCollection Items property, and I would like to be able to copy ListItems to this collection without having to use a F...
Robert Adkison
1

votes
0

answer
11

Views

A Problem to control the drop-down long menu using select size function

I am using a drop-down menu with a search option that excludes short-code search (based on my last post: How to ignore shortcode on html text search). Basically, it needs to look like this Country selection page: Now I have this very long drop-down menu that I would like to manage in a controlled wi...
Eli Marko
1

votes
0

answer
25

Views

Unable to obtain dropdown list in <html:optionsCollection> tag inside <html:select> tag

Adminprofile.jsp I am using options collection to iterate through agencylist and show dropdown values Agency Name Selectagency UserRegistrationForm.java Bean form for showing the jsp page. I have added the agency list here for getting it in the jsp page public class UserRegistrationForm extends org...
Srinivas Nani
1

votes
0

answer
33

Views

Vue: An empty option should remain selectabe

I have a documentwith many input fields. Some are dependent on another, i.e. when in the first input field an option is selected, the second one should give the corresponding options based on a database query. This works fine. Now I want to add for the second input field an empty option, wich should...
Peter
1

votes
0

answer
19

Views

how to retain the drop down value using 'selected' attribute after submitting the html form which is within the servlet class itself

public class ServletApplication extends HttpServlet { private static final long serialVersionUID = 1L; public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { int number1 , number2, number3; /* * Setting the content type to html */ response....
Hanok Jacob
1

votes
0

answer
54

Views

Angular: problem with routing (bootstrap-select library)

I'm developing a web application using Angular 6. I have a problem: I'm using the bootstrap library bootstrap-select (https://developer.snapappointments.com/bootstrap-select/) to create combo boxes (which allow search functionality). I have this problem: My application consists of several pages (c...
claudioz
1

votes
4

answer
63

Views

city dropdown not populating

I am trying to dynamically load cities into the select tag in HTML. I am able to choose the state and then i want to load the city through an ajax call. As far as console-logging the returned data it works, I am stuck with how i load this into the select option tags. Please help. Choose State
Alvin
1

votes
1

answer
494

Views

Add flag image to select option

Good day! Im a newbie. Im trying to add image in the option tag in the select. but when i run the code. It doesnt show the image. can someone help me? thank you This is the code: HTML: Custom select box Jquery Plugin by VJ You Selected Country : Select Select India Nepal
rrr
1

votes
1

answer
46

Views

How to align indent space between two words in drop-down list?

I have created drop-down list with two different text in which I need tab space, I have used word-spacing but this didn't work for me. Expected output: Volvo 2 Saab 4 Opel 6 As shown above those two values should come with maximum space between them while displayin...
MA Samad
1

votes
1

answer
73

Views

What is the value of a select when a disabled option is selected?

I'm using following html to get the selected-by-default disabled option 'Select a town' as a kind of placeholder. -- Select a town -- Paris London Budapest Now I'd like to test if any option has been selected by the user, or if it's still empty. I thought testing the select value using jquery ( $(...
fpierrat
1

votes
1

answer
24

Views

How to find the URL of an item in the dropdown list?

I need to find/create the URL of the page from its regular URL to automatically apply an option from one of the dropdown items. On a page, various sort options are available under a dropdown, and I need a URL that would automatically load the page with that particular sort option applied already. Fo...
John
1

votes
2

answer
45

Views

How to set a select list's options with jQuery 3.3.1

I've tried most of the answers to previous questions here, but I can't get jQuery to set an option in a select list as selected. I do get and iterate each option's text. Using jQuery 3.3.1. HTML: --DeSelect-- Administrator Manager User Code: $('#ddlrole option').each(function ()...
Neal Rogers
1

votes
1

answer
45

Views

How to make two similar drop down in PHP?

I am learning to make drop-down using values from sql tables. I have two drop-downs: Family member and Dzongkhag. The first one is working, but 2nd drop-down is not working. I have used the same code in the 2nd drop-drown, but it does not work. Attempt enter `enter code here`Add Record Form Plot n...
Sangpo
1

votes
3

answer
60

Views

How to set values of multiple select using JavaScript

To set data of an element using JavaScript, we assign the value and name of that element like this: var form = document.createElement('form'); var element = document.createElement('input'); element.value=value; element.name=name; In the case of a where the multiple attribute is present, how do I...
eggandegg
1

votes
1

answer
9.1k

Views

javascript select() function with named anchor

I want to use the JavaScript select() function to highlight a text field on a form, but first I want to use a named anchor so the page will scroll to the proper section. The following code works pretty well in Firefox, (Unless you enter the same value twice,) but IE does not allow the highlighted te...
Jon Wilson
1

votes
2

answer
778

Views

<select> ajax calls

I am using jQuery on my site and i have a update section on my project and I have three dropdowns: Completed? Hours Worked Who worked on this project? I am trying to create an ajax call using jQuery to when I select it, call a $.ajax() and send the data to my php page to update my mysql database. I...
Coughlin
1

votes
2

answer
1.1k

Views

IE6 jquery unable to update select tag options w/ .append

function getcsa(){ $.get('getcsas.php',{},function(xml){ $(xml).find('csa').each(function(){ var csa = $(this); var vzid = $(csa).find('vzid').text(); var firstname = $(csa).find('firstname').text(); var lastname = $(csa).find('lastname').text(); var option = ''+lastname+', '+firstname+''; $('#agen...

View additional questions