Uncaught SyntaxError: Invalid regular expression with fnFilter
Uncaught SyntaxError: Invalid regular expression with fnFilter
Ghetolobster
Posts: 2Questions: 0Answers: 0
Hey Guys,
I have run into a small roadblock and unsure how to resolve it. I am getting the following trying to implement a regex global filter [code]Uncaught SyntaxError: Invalid regular expression: /^(?=.*?*foo).*$/: Nothing to repeat [/code]
My Code are as follows
[code]
/* Table initialisation */
$(document).ready(function() {
var oTable;
/* Add the events etc before DataTables hides a column */
$("thead input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, oTable.oApi._fnVisibleToColumnIndex(
oTable.fnSettings(), $("thead input").index(this) ) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes
*/
$("thead input").each( function (i) {
this.initVal = this.value;
} );
$("thead input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$("thead input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init input-small";
this.value = this.initVal;
}
} );
oTable = $('#example').dataTable( {
"sDom": "<'row-fluid'<'span4 pleft ptop pbottom'l><'span4 ptop visible-desktop' T><'span4 ptop pright'f>r><'dataTables_scroll't><'widget-foot'<'pull-left'i><'pull-right'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page",
"sSearch": ""
},
"oTableTools": {
"sSwfPath": "js/datatable/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"csv",
"xls",
"pdf"]
},
"aLengthMenu": [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]
],
"bSortCellsTop": true
} );
oTable.fnFilter('',null,true);
} );
[/code]
ANY idea How i can resolve this matter?
All input is welcome!
I have run into a small roadblock and unsure how to resolve it. I am getting the following trying to implement a regex global filter [code]Uncaught SyntaxError: Invalid regular expression: /^(?=.*?*foo).*$/: Nothing to repeat [/code]
My Code are as follows
[code]
/* Table initialisation */
$(document).ready(function() {
var oTable;
/* Add the events etc before DataTables hides a column */
$("thead input").keyup( function () {
/* Filter on the column (the index) of this element */
oTable.fnFilter( this.value, oTable.oApi._fnVisibleToColumnIndex(
oTable.fnSettings(), $("thead input").index(this) ) );
} );
/*
* Support functions to provide a little bit of 'user friendlyness' to the textboxes
*/
$("thead input").each( function (i) {
this.initVal = this.value;
} );
$("thead input").focus( function () {
if ( this.className == "search_init" )
{
this.className = "";
this.value = "";
}
} );
$("thead input").blur( function (i) {
if ( this.value == "" )
{
this.className = "search_init input-small";
this.value = this.initVal;
}
} );
oTable = $('#example').dataTable( {
"sDom": "<'row-fluid'<'span4 pleft ptop pbottom'l><'span4 ptop visible-desktop' T><'span4 ptop pright'f>r><'dataTables_scroll't><'widget-foot'<'pull-left'i><'pull-right'p>>",
"sPaginationType": "bootstrap",
"oLanguage": {
"sLengthMenu": "_MENU_ records per page",
"sSearch": ""
},
"oTableTools": {
"sSwfPath": "js/datatable/copy_csv_xls_pdf.swf",
"aButtons": [
"copy",
"csv",
"xls",
"pdf"]
},
"aLengthMenu": [
[10, 25, 50, 100, -1],
[10, 25, 50, 100, "All"]
],
"bSortCellsTop": true
} );
oTable.fnFilter('',null,true);
} );
[/code]
ANY idea How i can resolve this matter?
All input is welcome!
This discussion has been closed.