problem with ie8 (init table on hidden div)

problem with ie8 (init table on hidden div)

handbuchhandbuch Posts: 55Questions: 0Answers: 0
edited January 2011 in General
Hello,

I've made a tool with datatables. The link is below. It works with FF Chrome and so on but IE8 does make a lot of Problems.

I get a error on the .datatable initilation, but it does draw the table. why do i get that? It says this object doesnt support or know this function/method. What should that mean?

I have a table, and you can add make a new entry into that table. Im doing that with a UI Dialog, that UI Dialog contains also a table made with datatable. The dialog is just a hidden div at the moment you go on that site. So it seems like i have a Problem, initialising a table which is in a hidden div. I would be sooo happy if someone know how i can fix that.

i've send you the link to the tool via the contact form.

here is one of the inits of a table:
[code]
tblNewDrink_Categories = $("#tblNewDrink_Categories").dataTable( {
"bPaginate": true,
"bRetrieve": true,
"bFilter":true,
"bInfo": false,
"bJQueryUI": true,
"sDom": '<"H"<"dropdown">f>t<"F"ipl>',
"sAjaxSource": "files/scripts/cat2.php",
"aoColumnDefs": [{
"fnRender": function ( oObj ) {
return '';
},
"aTargets": [ 0 ]
},
{ "bSortable": false,
"aTargets": [ 0] }],
"oLanguage": {
"sEmptyTable": "Es wurden noch keine Kategorien erfasst",
"sZeroRecords": "Keine Eintr

Replies

  • handbuchhandbuch Posts: 55Questions: 0Answers: 0
    edited January 2011
    I have it. At Least this one, have to check on the other. So what i've made wrong is, call a JS variable and a html element the same. Like my table had the ID #tblNewDrink_Categories and the JS var is called tblNewDrink_Categories.

    :)

    I dont really understand that becaus i have 2 tables. As i said, one in a hidden div. The first one, which is always visible never made problems, and there i also had the same name for html and JS. My next step was, make eveythign visible, turn of the dialog init. But still i had the problem with the second table, so i google a bit and found that issue, chagne it and it worked. Dont know why the first table works like that and the second doesnt.
  • allanallan Posts: 63,514Questions: 1Answers: 10,472 Site admin
    That shouldn't be the case :-) Javascript doesn't work that way (ActionScript for Flex does - but not Javascript). What I would strongly suspect is that the JSON from "cat2.php" has a trailing comma in it. If you run your JSON through http://jsonlint.com - it will tell you if there is something wrong with the JSON. If that doesn't let - let us know (thanks for the mail - but the user/pass doesn't seem to work - so I can't take a look).

    Allan
  • handbuchhandbuch Posts: 55Questions: 0Answers: 0
    edited January 2011
    Hi Alla,

    sry for the misstake. I will make a new account with login: allan pw: allan but the problem is fixed. I dont rly understand it but it seems to work, i still have a problm with IE, but thats something different which i first have to look at closer.

    The JSON is vaild, its made out of a numeric fetched query in php and encoded with json_encode.

    {"aaData":[["9","asd"],["8","asdasd"]]}

    And i think the problem doesnt have anything to do with hidden or not hidden.
This discussion has been closed.