asInitVals is not defined error.
asInitVals is not defined error.
Newinthezone
Posts: 22Questions: 0Answers: 0
Hi I am using server side processing for data tables with individual column filtering .
When I run my project, on the firebug console ,
I get an error : "asInitVals is not defined
http://localhost:3565/EmissionByRegion.aspx
Line 490"
This is my debug :
http://debug.datatables.net/uwokuf
This is my initialization for datatables
[code]
$(document).ready(function () {
var oTable = $('#myDataTable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/EmissionByRegion/DataProviderAction",
"sPaginationType": "full_numbers"
});
$("tfoot input").keyup(function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter(this.value, $("tfoot input").index(this));
});
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each(function (i) {
asInitVals[i] = this.value;
});
$("tfoot input").focus(function () {
if (this.className == "search_init") {
this.className = "";
this.value = "";
}
});
$("tfoot input").blur(function (i) {
if (this.value == "") {
this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
});
});
[/code]
When I run my project, on the firebug console ,
I get an error : "asInitVals is not defined
http://localhost:3565/EmissionByRegion.aspx
Line 490"
This is my debug :
http://debug.datatables.net/uwokuf
This is my initialization for datatables
[code]
$(document).ready(function () {
var oTable = $('#myDataTable').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/EmissionByRegion/DataProviderAction",
"sPaginationType": "full_numbers"
});
$("tfoot input").keyup(function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter(this.value, $("tfoot input").index(this));
});
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes in
* the footer
*/
$("tfoot input").each(function (i) {
asInitVals[i] = this.value;
});
$("tfoot input").focus(function () {
if (this.className == "search_init") {
this.className = "";
this.value = "";
}
});
$("tfoot input").blur(function (i) {
if (this.value == "") {
this.className = "search_init";
this.value = asInitVals[$("tfoot input").index(this)];
}
});
});
[/code]
This discussion has been closed.
Replies