Search
 
SCRIPT & CODE EXAMPLE
 

PHP

data showing in single option instead of multiple option from json array

$("#cityPicker").append('<option value="' + value
                            .districts + '">' + value.districts + '</option>');
                        }
Comment

data showing in single option instead of multiple option from json array

for (const district of value.districts) {
  $("#cityPicker").append('<option value="' + district + '">' + district + '</option>');
}
Comment

data showing in single option instead of multiple option from json array

let statePicker = $('#statePicker').val();
let list = $("#cityPicker");
$.each(res.states, function(key, value) { 
    if (value.state == statePicker) {
        $.each(items, function(item) {
          list.append(new Option(item, item));
        });
    }
});
Comment

PREVIOUS NEXT
Code Example
Php :: vagrant no pg_hba.conf entry for host 
Php :: JsonResource::withoutWrapping 
Php :: content for php.ini created manually 
Php :: envoyer mail php depuis localhost 
Php :: wp varnish ip 
Php :: disconnect with button click php 
Php :: laravel find user by id 
Php :: infoplist codepush key 
Php :: laravel csv import 
Php :: Supprimer automatiquement les mots courts des URL pour un meilleur SEO dans WordPress 
Php :: how to get only file orginal extension in codeigniter 3 
Php :: section laravel append 
Php :: Ajouter du contenu personnalisé sous chaque article/publication WordPress 
Php :: how to run php code in cmd 
Php :: Metabox Array 
Php :: laravel integer data type 
Php :: laravel tinker to test email on server 
Php :: Remove auto generate p from category description 
Php :: textarea autocomplete phpmyadmin style 
Php :: change php variable value in javascript 
Php :: wp plugin handles 
Php :: woocommerce disable payment method if coupon appied and total is 0 
Php :: xampp pdoexception could not find driver 
Php :: php string concat 
Php :: Route::any 
Php :: build_Assoc 
Php :: laravel Why using additive paramerer in Resource collection raised error 
Php :: The requested URL was not found on this server. Apache/2.4.47 (Win64) OpenSSL/1.1.1k PHP/7.3.28 Server at localhost Port 80 error in laravel 
Php :: php convert datetime to timestamp 
Php :: The provided cwd "C:laravel projectseccomer/../public_html" 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =