When the first application was built, it contained an array called photoList. This array is the source for a listview object called photo-list. the code will add an item to this object with the push command:
// simulator code, can remove when finished testing
var image = document.getElementById('lastImage');
if (photoModel.imageList.length >= 0) {
$("#file-info-div").hide();
$("#photo-list-div").show();
}
var widthMeasure = (photoModel.imageList.length + 1) * 100 + 5;
var scr = $("#photo-scroll-container");
scr.width(widthMeasure);
var serverImage = "images/server_room" + Math.floor(Math.random() * 3) + ".jpg";
photoModel.imageList.push({ fileName: serverImage });
photoModel.selectedPhoto = serverImage;
image.src = serverImage;
the html for this is :
<div id="photo-list-div" hidden="hidden" style="height: 70px">
<div id="photo-scroller" data-role="scroller" data-orientation="horizontal" style="height: 70px; z-index: 1000;">
<div id="photo-scroll-container">
<div id="photo-list" data-role="listview" data-template="template" data-bind="source: imageList, events: { click: imageSelect }" ></div>
</div>
</div>
</div>
Now this same code is being used in another app, but when except that the push command never adds the photo to the list.
Please help.
Cliff