multiple table works in FF and not in IE6

multiple table works in FF and not in IE6

bilbodigibilbodigi Posts: 18Questions: 0Answers: 0
edited May 2009 in General
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

Replies

  • bilbodigibilbodigi Posts: 18Questions: 0Answers: 0
    Ok I found out whats wrong.
    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.
  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin
    Hi bilbodigi,

    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
  • bilbodigibilbodigi Posts: 18Questions: 0Answers: 0
    Hi Allan
    You can test it here "http://avelsradet.hedren.nu/newindex3.php" username=anv
  • bilbodigibilbodigi Posts: 18Questions: 0Answers: 0
    I't will work if i put a ' '(space) in the beginning of my date.
    ex. before '2009-05-08' after ' 2009-05-08'
  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin
    Thanks for the link! I'm getting an "unresponsive script" error in both Firefox and IE - it must be doing some serious processing... Is this the error that you are seeing in IE as well? Perhaps you could provide more details about the specific error.

    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
  • bilbodigibilbodigi Posts: 18Questions: 0Answers: 0
    The"unresponsive script" error is because i use jeditable on each row & column in the first table. Just allow the script to run.
    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
  • allanallan Posts: 63,508Questions: 1Answers: 10,471 Site admin
    I'm having real trouble debugging this because the application is so slow with all the event handlers around the place. It might be worth looking into liveQuery to help with this.

    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
This discussion has been closed.