No data available in table with IE

No data available in table with IE

jasonpjasonp Posts: 4Questions: 0Answers: 0
edited February 2011 in General
Hi, I have a table that is Java driven from an oracle database with about 400 records and the following structure:

[code]






























[/code]

I'm using a basic init with a sort on the number one column:

[code]
jQuery("#striped").dataTable( {
"aaSorting": [[1,'asc']]
});
[/code]

I can't get this to display in IE, it simply loads a while longer then the other browsers and displays "No data available in table".

Any ideas?

Replies

  • jasonpjasonp Posts: 4Questions: 0Answers: 0
    Update:

    I was able to get the plugin working in IE, but now I get an error.

    Line: 2731
    Error: Object doesn't support this property or method

    [code]2731 aLocalData[jInner] = $(nTds[j]).text().trim();[/code]
  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Hi jasonp,

    I think the problem probably stems from the fact that unfortunately your HTML is invalid. The TBODY can only have the TR element as a child element(s) - from the HTML 4 strict doc type:

    [code]
    <!ELEMENT tbody (tr)+>
    [/code]
    DataTables does a lot of using child elements to speed up processing as must as possible, so it requires the HTML structure to be valid. I suspect that this is the root of the issue.

    What did you do to get it working in IE?

    Regards,
    Allan
  • jasonpjasonp Posts: 4Questions: 0Answers: 0
    Yeah, I saw that. To get it working I moved the form outside of the table instead of nested in the tbody element.

    I ended up having to use the 1.7.6.dev script and it fixed the error I was getting.
  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Ah good - so you aren't getting the error you had on line 2731 with the latest development version? That would be good news :-)

    Allan
  • jasonpjasonp Posts: 4Questions: 0Answers: 0
    Nope, no more error!
  • allanallan Posts: 63,205Questions: 1Answers: 10,415 Site admin
    Hooray :-). Good to hear that - time to release 1.7.6.... ;-) (a few more things to do with it first actually).

    Regards,
    Allan
This discussion has been closed.