I have this output that I got from my PHP page:
{"schedules":{"Event_Date":"2011-03-12","Meet_Name":"Time Trials ","Duration":"9:00am-12:00pm","Location":"Agoura High School","Address":"28545 Driver Ave","City":"Agoura Hills","State":"CA","Postal":"91301"}}
I would like to render this output as HTML using this Javascript code:
var serviceURL = "http://localhost/";
var schedules;
$('#Schedule').bind('pageinit', function(event) {
getScheduleList();
});
function getScheduleList() {
$.getJSON(serviceURL + 'get_Mobile_Schedule.php', function(data) {
$('#schedulelist li').remove();
schedules = data.items;
$.each(schedules, function(index, item) {
$('#schedulelist').append('<li><h4>' + item.Event_Date +'</h4>'
);
});
$('#schedulelist').listview('refresh');
});
}
But it seems that I cannot get anything to render.
Does anyone have any suggestions?
Thanks!