TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
mad pop
NA
18
8.7k
How to apply paging for a dynamic generated table using java
Feb 23 2017 8:18 AM
I unable to understand how to apply a paging for a dynamically generated table below is my code
$.ajax({
type: 'GET',
url: services.settings.dailydata,
data: "inviteId_=" + inviteId + "",
success: function (data) {
var Location = data;
var tr;
for (var i = 0; i < Location.length; i++) {
tr = tr + "<tr>";
tr = tr + "<td >" + Location[i].item + "</td>";
tr = tr + "<td >" + Location[i].itemname + "</td>";
tr = tr + "<td >" + Location[i].itemprice.toFixed(2) + "</td>";
tr = tr + "<td >" + Location[i].Unit + "</td>";
tr = tr + "</tr>";
};
document.getElementById('stc_d').style.display = "block";
document.getElementById('tbl_data').innerHTML = "<table id='xo1' >" + "<thead ><tr><th>item</th>"
+ "<th>itemname</th>" + "<th>itemprice</th>" + "<th>Unit</th>"+ "</tr></thead>"
+ tr +
"</table>";
},
error: function (e) {
navigator.notification.alert('Please enter valid details');
}
});
so can any one tell me how and where to implement paging ?
Reply
Answers (
1
)
color the table row to red
Modifying the Jquery library