JavaRanch » Java Forums »
Engineering »
HTML, CSS and JavaScript
| Author |
Drop Down List do not create when more elements added
|
Nakata kokuyo
Ranch Hand
Joined: Apr 13, 2005
Posts: 437
|
|
Good day All, i using PHP for the project to create a SELECT/Drop down for the Country and state Code to create Drop-down list and i putting this way FYI, fillCategory() in fact is a function with PHP code which get the value from database. the value here are where i captured from Firefox error console, the strange case here is if i have put limitation for DB query like "SELECT * from country limit 10" , then it will generate the Drop down list but not the case of full list. Can any expert here point out what's wrong on my JS script ? thank you for your guidance !
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
Change to I personally would do it like this: Eric
|
 |
Nakata kokuyo
Ranch Hand
Joined: Apr 13, 2005
Posts: 437
|
|
Thanks Eric for the guidance i just have 1 more question, by looking at the code below Why we do not need to increment the length of the options and it will allow continue add on new option
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
You are adding an option to the next available position in the list. Just like how you add a new option to an array. Eric
|
 |
 |
|
|
subject: Drop Down List do not create when more elements added
|
|
|
|