Microsoft JScript runtime error: 'style' is null or not an object
Microsoft JScript runtime error: 'style' is null or not an object
Maggot
Posts: 2Questions: 0Answers: 0
Hello all, thanks for taking the time to look at this problem.
I am using Visual Studio 2005 to build a website using DataTables. It works fantastically in the better browsers (Opera, Firefox and Safari) but I continue to get the error above in IE (Version 8) which halts the code and fails to format the table as expected.
I have searched the forum for similar topics and wondered if there was a fix or step I need to carry out to stop this error.
I am using the following code:
$(document).ready(function () {
//Set the results table
oTable = $('#example').dataTable({
"bProcessing": true,
"bJQueryUI": true,
"iDisplayLength": 35,
"bLengthChange": false,
"aoColumns": [{ "sSortDataType": "dom-text" }, { "sSortDataType": "dom-text" }, { "sSortDataType": "dom-text", "sType": "numeric" }, { "sSortDataType": "dom-text", "sType": "numeric" }, { "sSortDataType": "dom-text", "sType": "numeric"}],
"aoColumns": [null, null, null, null, { "asSorting": ["desc", "asc"]}],
"aoColumns": [{ "sWidth": "450px" }, { "sWidth": "450px" }, { "sWidth": "50px" }, { "sWidth": "50px" }, { "sWidth": "50px"}],
"sPaginationType": "full_numbers"
});
});
I apologise if I have failed to find a solution, but any help would be brilliant.
I am using Visual Studio 2005 to build a website using DataTables. It works fantastically in the better browsers (Opera, Firefox and Safari) but I continue to get the error above in IE (Version 8) which halts the code and fails to format the table as expected.
I have searched the forum for similar topics and wondered if there was a fix or step I need to carry out to stop this error.
I am using the following code:
$(document).ready(function () {
//Set the results table
oTable = $('#example').dataTable({
"bProcessing": true,
"bJQueryUI": true,
"iDisplayLength": 35,
"bLengthChange": false,
"aoColumns": [{ "sSortDataType": "dom-text" }, { "sSortDataType": "dom-text" }, { "sSortDataType": "dom-text", "sType": "numeric" }, { "sSortDataType": "dom-text", "sType": "numeric" }, { "sSortDataType": "dom-text", "sType": "numeric"}],
"aoColumns": [null, null, null, null, { "asSorting": ["desc", "asc"]}],
"aoColumns": [{ "sWidth": "450px" }, { "sWidth": "450px" }, { "sWidth": "50px" }, { "sWidth": "50px" }, { "sWidth": "50px"}],
"sPaginationType": "full_numbers"
});
});
I apologise if I have failed to find a solution, but any help would be brilliant.
This discussion has been closed.
Replies
[/code]
var i=0;
i=1;
i=2;
[/code]
and expecting i to hold 0, 1 and 2 at the same time :-). You need to combine them into a single statement.
Beyond that, if that hasn't fixed it can you give us a link to the page with the problem please.
Allan
//Set the results table
oTable = $('#example').dataTable({
"bProcessing": true,
"bJQueryUI": true,
"iDisplayLength": 35,
"bLengthChange": false,
"aoColumnDefs": [
{ "asSorting": ["desc", "asc"], "aTargets": [ 4 ] },
{ "sWidth": "450px", "aTargets": [ 0, 1 ] },
{ "sWidth": "50px", "aTargets": [ 2, 3, 4 ] },
{ "sSortDataType": "dom-text", "aTargets": [ 0, 1, 2, 3, 4 ] },
{ "sType": "html", "aTargets": [ 2, 3, 4 ] }
],
"sPaginationType": "full_numbers"
});
It still fails to fully execute as before in IE and (as I later found) in Safari. Firefox and Opera are fine.
Any further help will be appreciated.
Allan
My experience has shown that every browser, but IE, can deal with an extra comma at the end of an array and IE can't. Whenever I see this kind of message I hunt for one in my config file. 90% of the time it's just that. Most often it's an extra one at the end, just takes some careful reading of the code.
James
Thanks!