I have an array that's returning [object Object] instead of what it's assigned.
I am creating an array to hold a listbox list.
Expand|Select|Wrap|Line Numbers
- function list(name, value) {
- this.name = name;
- this.value = value;
- }
- function populateList(b){
- var airforce = new Array();
- airforce[0] = new list("General", "General");
- airforce[1] = new list("Lieutenant-General", "Lieutenant-General");
- switch = b;
- switch (branch){
- case "airforce":
- for (var i=0;i<airforce.length;i++) {
- document.form1.Rank.options[i] = new Option(airforce[i]);
- }
- break
- ...
- ...
- default:
- }