.destroy() is not working.
.destroy() is not working.
Abhi R
Posts: 17Questions: 5Answers: 0
Hello All,
This is ajax code below
$.ajax({
url: "/ModalDisplay/UpdateMeeting/",
dataType: 'json',
type: 'POST',
data: data,
cache: false,
success: function (result) {
alert(result.Schedule.IsRecursive)
if (result.Schedule.IsRecursive == false) {
upcoming.destroy();
recursive.destroy(); //Over here error
RecursiveMeeting();
UpcomingMeeting();
}
else {
upcoming.destroy();
recursive.destroy();
UpcomingMeeting();
RecursiveMeeting();
}
$("#pageLoaderScheduleQuickMeeting").hide();
},
error: function (xhr, ajaxOptions, thrownError) {
errorMsg("Something went Wrong. Please try again !");
}
});
I am geting
Uncaught TypeError: Cannot read property 'destroy' of undefined
at Object.success (AdminScript.js:431)
at i (jquery.min.js:2)
at Object.fireWith [as resolveWith] (jquery.min.js:2)
at y (jquery.min.js:4)
at XMLHttpRequest.c (jquery.min.js:4)
For recursive.destroy();
Whats the problem ??
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
The problem is basically what the error message says
recursive
is undefined.Either the variable is not scoped as you expected, or it hasn't be initialised yet.
Allan
Thanks That problem is fixed
@allen Is there any example for infinite scroll.
I mean on scroll load the data.
Not one that I've published. But you could just listen for the scroll event and then use
rows.add()
to add newly loaded rows.Allan