Help with wikipeida Viewer!

Help with wikipeida Viewer!
0

#1

Hello. please help me tell me where is the error
the for loop doesn’t work for me


#2

Are you sure your success function is even being called?

Put a console.log(repons) inside the success function, to check if it being called.


#3

I don’t know where is the problem??


#4

the console tell me the “repons[1].length” is not defined


#5

What are you entering into the search form?


#6

yes the success function is work correctly


#7

When I enter Bee and select Bee or Beef and click the Wiki Search button, nothing shows in the console when I put console.log(‘success was called’); as the first line of the success funciton.


#8

console.log(repons); it work for me !!! it get the success repons


#9

OK, if you are getting data back, is it in an array format in which you can iterate via a for loop?


#10

this is my for loop but doesn’t work !!

for(var i = 0; i < repons[1].length; i++) {
    $("#output").append("<div class='well'><a href="+repons[3][i]+"><h2>" + repons[1][i]+ "</h2>" + "<p>" + repons[2][i] + "</p></a></div>");
    
  }