Type Detection Plug-in
Type Detection Plug-in
Hi Allan,
I am using the Type Detection plug in per your documentation in Plug-ins > Type Detection and it doesn't seem to be working for me. Basically I have a few columns in my table that have spaces and other html code along with it. I am removing the white space and all the html prior to checking the datatype. Here is the code snippet:
[code]
jQuery.fn.dataTableExt.aTypes.push(
function ( sData )
{
//Removing HTML, comma and space from the input data
sData = String(sData).replace(/<[^>]*>?/g, "").replace(/ /g, "").replace(/,/g, "");
sData = String(sData).replace( /<.*?>/g, "" );
var sValidChars = "$0123456789.-,";
var Char;
/* Check the numeric part */
for ( i=0 ; i
I am using the Type Detection plug in per your documentation in Plug-ins > Type Detection and it doesn't seem to be working for me. Basically I have a few columns in my table that have spaces and other html code along with it. I am removing the white space and all the html prior to checking the datatype. Here is the code snippet:
[code]
jQuery.fn.dataTableExt.aTypes.push(
function ( sData )
{
//Removing HTML, comma and space from the input data
sData = String(sData).replace(/<[^>]*>?/g, "").replace(/ /g, "").replace(/,/g, "");
sData = String(sData).replace( /<.*?>/g, "" );
var sValidChars = "$0123456789.-,";
var Char;
/* Check the numeric part */
for ( i=0 ; i
This discussion has been closed.
Replies
I looked at the live example where you have used unshift instead of push and it is working fine with unshift.
Thanks
Allan