Filling a List by using javascript
Posted: Mon Aug 27, 2012 8:39 pm
I am reading some data from a JSON-file and want to display the results (var lavername in the following code) in a list item on the screen (for example mobilescreen2). Any suggestions?
Here is the code for getting my results:
count = data.Geocockpit.length;
var countlayers = 0;
Code: Select all
while (countlayers < count) {
$.each(data.Geocockpit[countlayers], function (layername, value) {
alert("Categorie: " + layername);
}); //$.each
countlayers++;
} //end while;