Linked Questions
28 questions linked to/from JavaScript - populate drop down list with array
0
votes
5
answers
7k
views
Set selectbox value using javascript [duplicate]
Possible Duplicate:
JavaScript - populate drop down list with array
I have following select box,
<select name="supplier" id="supplier"><option></option></select>
I want to ...
-5
votes
1
answer
181
views
How can I create an option element using javascript and set it's value [duplicate]
const currencies = [
{
id: 'USD', name: 'US Dollars'
}, {
id: 'UGX', name: 'Ugandan Shillings'
}, {
id: 'KES', name: 'Kenyan Shillings'
}, {
id: 'GHS', name: 'Ghanian Cedi'
},...
61
votes
11
answers
112k
views
Unexpected token ILLEGAL in webkit
// if the box is outside the window, move it to the end
function checkEdge() {
var windowsLeftEdge = $('#window').position().left;
$('.box').each( function(i, box) {
// right edge of ...
30
votes
6
answers
117k
views
how can I give an array as options to select element?
I have a select element on my HTML page. I want to populate it with an array. as we can give an array as dataprovider to comboBox in action script. I do the following
in HTML...
<table>
<...
6
votes
3
answers
10k
views
Are add() and appendChild() the same for select DOM objects?
I'm working on a small web application that changes the contents of a select drop-down.
I was wondering if appendChild() and add() both accomplish the same task on a select DOM object in JavaScript?
...
1
vote
5
answers
10k
views
Populating a drop down box with a variable containing comma seperated values
How can I, populate a select box based on a variable that will contain data by comma separated values?
Example:
var x = Jenny,John,Stephanie,Marc,Ryan,Jessica
Expected result:
[DROP DOWN BOX]
Jenny
...
2
votes
3
answers
9k
views
Populate array elements in dropdown list using javascript
I am trying to add array elements to dropdownlist using javascript and refered the following links but it did not work:
JavaScript - populate drop down list with array
use a javascript array to fill ...
user avatar
user4892380
1
vote
3
answers
3k
views
Filling out Combobox Using JSON value
Hello I have a following html
<select id="fld_base_profile_id" defaultValue="-1" class="m-wrap span10" field="fld_base_profile_id" appEditor="true"></select>
I have this in my ajax
$...
-1
votes
1
answer
3k
views
How to append value from ajax to select option?
How to bind the value from the ajax call to the select option?
This is an example of my API https://codepen.io/anon/pen/wNrLZm?editors=1010
I fetched data and need to print in HTML select option? ...
1
vote
1
answer
2k
views
How to fetch data from database from the second dropdown value
I have a HTML like this
<label>Brand</label></br>
<select name="brand" id="brand" onChange="changecat(this.value);">
<option value="" selected>Select Brand</...
0
votes
3
answers
2k
views
How to create dropdown from array of object? [closed]
Suppose I have this JSON
let array = [
{
"Ids": "Sec 1",
"details": [
{
"id": "5ae82",
"...
0
votes
2
answers
2k
views
How to add a scrolling list of an array from Javascript in HTML
How could I use an array to fill the options in a scrolling list. eg/
<B>Select some fruit:</B> <BR>
<SELECT NAME="Morefruit" SIZE="4" MULTIPLE >
<OPTION SELECTED> ...
1
vote
4
answers
1k
views
Javascript only working when inside the html document [duplicate]
I been trying to have an array populate a drop down, I got this examples from this post: JavaScript - populate drop down list with array
I'm using this html:
<select id="selectNumber">
<...
0
votes
2
answers
661
views
jQuery Autocomplete options based on other Autocomplete input
I want a user to select a company and then an employee from this company. I saw similar questions, the most similar is this but I want both inputs to be autocomplete.
I have following code:
<div ...
0
votes
1
answer
404
views
Efficiently populate Select Elements in 2019
I had to dynamically populate an HTML select element via the DOM and Javascript.
I did a little research and I got things working with no problem, but I had some further questions.
I found 2 ...