fix problem it was a timing issue I add the following
function LinkLoading() {
var page = 1;
$.ajax({
type: "POST",
url: "tabletbook.aspx/GetPageLinks",
data: JSON.stringify({ Bookid: BookID, page: page }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
Contents = msg.d;
}
});
}
function LinkLoading(BookID, page) {
$.ajax({
type: "POST",
url: "tabletbook.aspx/GetPageLinks",
data: JSON.stringify({ Bookid: BookID, page: page }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
Right = data.d;
}
});
}
page = page + 1;
$.ajax({
type: "POST",
url: "tabletbook.aspx/GetPageLinks",
data: JSON.stringify({ Bookid: BookID, page: page }),
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
left = data.d;
}
});
fixed problem.