jQuery each function, getting the data out of it
Posted
by Ankur
on Stack Overflow
See other posts from Stack Overflow
or by Ankur
Published on 2010-04-08T06:13:06Z
Indexed on
2010/04/08
6:23 UTC
Read the original article
Hit count: 245
I am trying to use the jQuery each function (line 5) to display the results of an AJAX call. when I write resultObj.value on line 6 how come I am not getting any data?
Am I making a syntax error (I am pretty sure that I must be)?
success : function(resultObj) {
count = count+1;
$(".objHolder").filter("#"+id).append("<table border='1' cellspacing='4' cellpadding='4' class='preTable' id='"+id+"' level='"+count+"'><tr><td class='preItem' id='"+id+"' level='"+count+"'><img src='images/right.jpg' width='16' height='10' /></td><td class='preList'> </td><td class='preHolder' level='"+count+"'> </td></tr></table>");
isClicked[level]="yes";
$.each(resultObj, function(index, value){
$(".preHolder").filter("#"+id).append(resultObj.value);
});
}
});
© Stack Overflow or respective owner