Problems in IE8
Problems in IE8
dmclean
Posts: 55Questions: 2Answers: 0
I'm trying to track down some problems that occur in IE8. The error occurs in the section of code below. On the console, I get the output shown at the bottom. Without the try/catch, the IE stack trace points to a section of embedded CSS (clearly not helpful).
I'm using DataTables 1.8.2 (non-minimized version) with JQuery 1.7.1 (again, non-minimized version) and I would rather not upgrade until I wrap up this iteration and start the next one.
Any suggestions on how to correct the problem (if you magically know the answer), or what I can do to find out the underlying source of the problem would be greatly appreciated.
Thank you,
Donald
[code]
try {
contextTable = $('#contextData').dataTable({
"sScrollY":"600px",
"bPaginate":false,
"bSortClasses":false,
"aoColumns":[
{ "bSortable":false },
null,
null,
null,
null,
null,
null,
null,
null,
null,
{ "bVisible": false }
],
"aaSorting":[
[1, 'asc']
],
"fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
nRow.setAttribute("class", aData[STATUS_INDEX]);
return nRow;
}
});
oTable = contextTable;
} catch (e) {
console.log("Exception calling dataTable: " + e.name + ", " + e.message)
}
[/code]
LOG: Exception calling dataTable: TypeError, Object doesn't support this property or method
I'm using DataTables 1.8.2 (non-minimized version) with JQuery 1.7.1 (again, non-minimized version) and I would rather not upgrade until I wrap up this iteration and start the next one.
Any suggestions on how to correct the problem (if you magically know the answer), or what I can do to find out the underlying source of the problem would be greatly appreciated.
Thank you,
Donald
[code]
try {
contextTable = $('#contextData').dataTable({
"sScrollY":"600px",
"bPaginate":false,
"bSortClasses":false,
"aoColumns":[
{ "bSortable":false },
null,
null,
null,
null,
null,
null,
null,
null,
null,
{ "bVisible": false }
],
"aaSorting":[
[1, 'asc']
],
"fnRowCallback": function(nRow, aData, iDisplayIndex, iDisplayIndexFull) {
nRow.setAttribute("class", aData[STATUS_INDEX]);
return nRow;
}
});
oTable = contextTable;
} catch (e) {
console.log("Exception calling dataTable: " + e.name + ", " + e.message)
}
[/code]
LOG: Exception calling dataTable: TypeError, Object doesn't support this property or method
This discussion has been closed.
Replies
Thanks,
Allan
Donald
If you remove the try/catch code, leaving just the DataTables initialisation, does the error point to something a bit more specific?
Thanks,
Allan
http://datatables.net/forums/discussion/5082/object-doesnt-support-property-or-method-datatable/p1
It should be "var contextTable"
I'm also getting a similar error in the function shown below, but I haven't figured that one out yet.
[code]
var baseString = "";
var commandString = "";
var options = new Array();
var required = new Array();
$.fn.dataTableExt.oApi.fnDoSomething = function (oSettings, opName) {
console.log("[fnDoSomething] enter.");
baseString = "";
commandString = "";
options = new Array();
required = new Array();
try {
var statusList = createStatusList(oSettings);
// for (var k = 0; k < statusList.length; k++) {
// console.log("[fnDoSomething] statusList[" + k + "]: " + statusList[k].name + ", " + statusList[k].count);
// }
var dadsOp = findOp(opName);
var messageContent = dadsOp.messageOne;
if (statusList.checkCount > 1) {
messageContent = dadsOp.messageMult;
}
createPopup(messageContent, statusList);
var idList = "";
for (var i = 0; i < statusList.length; i++) {
var next = statusList[i];
var j = 0;
for (j = 0; j < next.idList.length; j++) {
if (idList.length > 0) {
idList = idList + ",";
}
idList = idList + next.idList[j];
}
}
baseString = dadsOp.agent + ";" + idList;
overlay();
}
catch(e) {
console.log("[fnDoSomething] got exception: " + e);
}
};
[/code]
> Ah! Interesting - I didn't know that, but very useful knowledge
I wish that knowledge had stuck a bit longer than it did! It should be that your variable would just become 'global', but obviously IE8 does something odd...
For the second issue - if you remove the try/catch, does IE not give you the line number for where the error is occurring?
Allan
I click on this button:
Which calls the code above. I get this message:
Object doesn't support this property or method aoiDev, line 42 character 20
When I click on the "link" for aoiDev, line 42, character 20 it sends me to this part of the file:
[code]
.sidebar ul li {
margin: 0;
padding: 1px;
list-style: none;
border: 1px solid #ccc;
border-bottom: none;
}
[/code]
where line 42 is the padding line, and character 20 is the colon. Obviously, that's not the actual line or character, but IE just isn't being very helpful and I'm not sure what to try next.
What's the code that uses aoiDev?
Allan
Allan