Unable to use TableTools plugin & not able to reinitialize the DataTables object
Unable to use TableTools plugin & not able to reinitialize the DataTables object
sachin_kakkar83
Posts: 5Questions: 0Answers: 0
I am new to Table Tools plugin. I want to use this plugin in my project. Have already used Datatables with success. Would be great if someone can help me out with the below 2 issues:
1. When I use DataTables, the data is fetched from the server and a table is displayed on the web page. But after changing my input query, the previous table is only getting displayed. I am not able to figure out how to destroy the previous table object and create a new one. Have gone through few "Discussions " but no success. Can someone please help me out with that ? Pasted the code below
2. Not able to use TableTools in my code.Please refer to the below code. The below jsp is making use of data tables. I tried using Table Tools but no icon is getting visible. Can you please tell me what am I missing ?
===============================================================
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
Insert title here
function ajaxFunction() {
document.getElementById('demo_jui').style.display='';
$(document).ready(function () {
var empname = document.getElementById("empname");
var defecttype = document.getElementById("defecttype");
var project = document.getElementById("project");
$("#companies").dataTable({
"bServerSide": true,
"sAjaxSource": "/JQueryDataTables/CompanyAjaxDataSource?empname="+empname.value+"&defecttype="+defecttype.value+"&project="+project.value,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bJQueryUI": true
});
});
}
Enter Details
Employee's Name
ABC
Defect Type
FST
AT
Regression
ASM
Project
UC-1202
DefectId
EmployeeId
Severity
Defect Type
Project
Original Owner
Coded By
Root Cause
Defect Category
Efforts
1. When I use DataTables, the data is fetched from the server and a table is displayed on the web page. But after changing my input query, the previous table is only getting displayed. I am not able to figure out how to destroy the previous table object and create a new one. Have gone through few "Discussions " but no success. Can someone please help me out with that ? Pasted the code below
2. Not able to use TableTools in my code.Please refer to the below code. The below jsp is making use of data tables. I tried using Table Tools but no icon is getting visible. Can you please tell me what am I missing ?
===============================================================
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
Insert title here
function ajaxFunction() {
document.getElementById('demo_jui').style.display='';
$(document).ready(function () {
var empname = document.getElementById("empname");
var defecttype = document.getElementById("defecttype");
var project = document.getElementById("project");
$("#companies").dataTable({
"bServerSide": true,
"sAjaxSource": "/JQueryDataTables/CompanyAjaxDataSource?empname="+empname.value+"&defecttype="+defecttype.value+"&project="+project.value,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bJQueryUI": true
});
});
}
Enter Details
Employee's Name
ABC
Defect Type
FST
AT
Regression
ASM
Project
UC-1202
DefectId
EmployeeId
Severity
Defect Type
Project
Original Owner
Coded By
Root Cause
Defect Category
Efforts
This discussion has been closed.
Replies