I am calling rest api through jquery and i need to read the videoList value in javascript.
below my code,every time alert is saying undifined.
How to read videoList in javascript?
I am calling rest api through jquery and i need to read the videoList value in javascript.
below my code,every time alert is saying undifined.
How to read videoList in javascript?
I added your code into the ticket, and there are two issues to look at.
Here is your original code:
$(document).ready(
function() {
$.get(
'123/movies';,
function(data) {
$("#videoList").data(data.entries);
}
);
}
);
var list = $("#videoList").listview;
alert(list);
You have an extra semicolon in your parameters to "get()" (after '123/movies').
We can't see your HTML, which could provide a clue.
Also, because it is outside of "$(document).ready(...)", your code to fetch videoList and alert the result is running before the page finishes loading.