multiple table works in FF and not in IE6
multiple table works in FF and not in IE6
Hi
I want to have to diffrent table and i try to setup the table like this
[code]
/* Init DataTables */
oTable = $('#myTable').dataTable({
"bAutoWidth": false,
"bProcessing": true,
"aaSorting": [[11,'desc'], [3,'asc']],
"aoColumns": [
/* ID */ { "bSearchable": false,
"bVisible": false },
/* Betalt */ { "sClass": "mEdit" },
/* f
I want to have to diffrent table and i try to setup the table like this
[code]
/* Init DataTables */
oTable = $('#myTable').dataTable({
"bAutoWidth": false,
"bProcessing": true,
"aaSorting": [[11,'desc'], [3,'asc']],
"aoColumns": [
/* ID */ { "bSearchable": false,
"bVisible": false },
/* Betalt */ { "sClass": "mEdit" },
/* f
This discussion has been closed.
Replies
In the second table Col 1 is a date.
And that will give an error i the function '_fnSort'.
But i don't now how to handle this.
What error is it you get in IE? I presume that if you remove (or just comment out) the initialisation for the first table then you still get an error with the second table? Any chance you can provide a link to a sample page showing this error, or if not, can you post some example data?
Thanks,
Allan
You can test it here "http://avelsradet.hedren.nu/newindex3.php" username=anv
ex. before '2009-05-08' after ' 2009-05-08'
Also from my first comment "I presume that if you remove (or just comment out) the initialisation for the first table then you still get an error with the second table? " Is that the case? Or does the second table need the first to be initialised.
Very odd that it works with a space at the front of the string. That would suggest that it's an issue with the Date.parse() (possibly it's speed).
Allan
No it is not that error i get. The error i get is inside 'jquery.dataTables.js' and i track it down to to function '_fnSort' at line 2571
/* The eval has to be done to a variable for IE */
eval( sDynamicSort );
oSettings.aiDisplayMaster.sort( fnLocalSorting );
} !!!!!!!!!!!!!! Here come's the error 'A number is expected. Code 0
Regardless, I believe I know what the error is and it's a know error in DataTables (which will be fixed in the next release!). The issue is that DataTables thinks that "2008-11-10" etc is a number! It's obviously not, but all the component for a number are there... As I say this will be fixed in the next release, but the work around for now is to define the column type explicitly ( http://datatables.net/usage#sType ). Set it to date (assuming that Date.parse() will pick that date up?) or 'string'. If Date.parse() doesn't pick it up, you'll need to add a custom sorting functions.
Hope that helps,
Allan