Filling a List by using javascript

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;

while (countlayers < count) {

$.each(data.Geocockpit[countlayers], function (layername, value) {
alert("Categorie: " + layername);
}); //$.each

countlayers++;

} //end while;
1 person has
this question
+1
This topic is no longer open for comments or replies.
  • Here is the solution:

    count = data.Geocockpit.length;

    var countlayers = 0;

    while (countlayers < count) {

    $.each(data.Geocockpit[countlayers], function (layername, value) {
    //alert("Categorie: " + layername);
    var list = Tiggr("mobilelist1");

    list.append("
  • " + layername + "
  • ").listview("refresh");

    countlayers++;
    }); //$.each

    } //end while;
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated happy, confident, thankful, excited