Simonetos The Greek
Member
- Messages
- 9
- Likes
- 0
With this part of code, I am trying to put all found layer names (layersData) into dropdownlist2_array, but instead of a list with names, I get one line with all names!!! Any idea what am I doing wrong? Thank you in advance!!!
JavaScript:
var layerNames = [];
for (var i = 0; i < layersData.length; i++)
{
var layerName;
layerName = layersData[i].name;
layerNames.push(layerName);
};
var dropdownlist2_array = [layerNames];
var dropdownlist2 = panel2.add("dropdownlist", undefined, dropdownlist2_array);
dropdownlist2.selection = -1;
dropdownlist2.text = "Layer Name:";
Last edited: