The AJAX is returning the data. I can see the JSON in firebug but it does not get presented on the page. I assume the bug is somewhere in the data getting parsed. The submit form button works and a row gets inserted but when the user comes to the page all the todo items should be displayed first. Here is the link:
janisrough.dyndns.biz/todo17.html
How do I trouble shoot? The success alert doesn't fire.
Thnanks,
$(document).ready(function() {
$.ajax({
url: 'ajax/form_handler_copy.php',
dataType : 'json',
success: function(data) {
alert(success);
var list_start ='<li class = "todo-list" >';
var list_end ='</li>';
var checkbx ='<input type="checkbox" id="task" checked="false" />';
var delRow ='<input type="button" value="Delete" class="btnDelete" onclick="deleteRow(this)" />';
$('.result').html(data);
alert('Load was performed.');
var rows= '';
$.each(data, function(idx,item) {
rows+= list_start + checkbx + item.todo + ', ' + item.name + item.date + delRow +list_end;
});
$("ul").append(rows);
}
//end success
}) //end ajax