[V2]Ajax and getting Undefined


#1

998

im always getting undefined when request using ajax and pass to element


i see at console, thats fine , no error , but at div always append undefined…

after undefined , that data is works

@nolimits4web


#2

Impossible to say anything without code examples of what you are doing


#3

nope @nolimits4web .

already solved , im wrong typing with variable…

my code before when getting undefined is :

**var trHTML;**
        $.each(arr, function (ix, nilai) {
            var gambar = storage + arr[ix].thumbnail;
          	trHTML += ' blablabla'
 }); 
            $('#listlatest').append(trHTML); 

and the problem is :
var trHTML;

thats should be var trHTML = ’ ’

and now works fine , im new at V2 btw . hope this v2 is great.