aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Drop Down List do not create when more elements added Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Drop Down List do not create when more elements added" Watch "Drop Down List do not create when more elements added" New topic
Author

Drop Down List do not create when more elements added

Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 439
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: 15376
    
    6


Change to



I personally would do it like this:


Eric
Nakata kokuyo
Ranch Hand

Joined: Apr 13, 2005
Posts: 439
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: 15376
    
    6
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Drop Down List do not create when more elements added