I'm going cross-eyed. I had this same problem before and resolved it by moving to the <5.2 version of the server-side script as well as eliminating a rogue comma. I tested IE a few minutes ago and it appears to be broken again.
/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array( 'ID', 'VENDOR', 'BUILDING_CLLI', 'ILEC_CLLI', 'ADDRESS', 'FLOOR','ROOM', 'CITY', 'STATE', 'ZIP', 'NPA', 'NXX', 'LATA', 'LIST_DATE','COUNTRY','LON','LAT','PRICING_MARKET','PRICE_TYPE','PL_DS1','PL_DS3','PL_OC3','PL_OC12','PL_OC48','EPL_FE','EPL_GE','EMAIL','POP','NOTES','SWITCH','HOME_TO','HOME_LAT','HOME_LON','STATUS','ACCURACY','PARTIAL_MATCH');
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "ID";
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
//include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
* no need to edit below this line
*/
Nothing below was changed.
[/code]
This appears to be limited to IE 8 and older... I know, I know... who cares about IE 8 since it's reached it's EOL, however it's still installed on machines where I work.
I apologize... no javascript errors... just no results appearing in IE 8 and older. I've done some extensive re-writing to make sure the number of columns, etc. match up as I've seen many issues regarding this and I've poured over everything to make sure I don't have a rogue comma. I'll give the debugger a shot and respond back. Thanks so much!
I don't see anything in there that looks particularly odd - although because you've got a custom fnServerData method, I can't tell what JSON is being returned. Perhaps a trailing comma in there?
The trailing comma is possible. That's how I fixed the issue before (in combo with switching to the >5.2 version of the server side processing script), but I couldn't find the darned thing this go around! Any suggestions on where it could be other than the sections of code I posted above?
I have and I get nothing in IE 8. No errors what-so-ever. IE9 seems to work just fine. Live project is here: http://capacity.nuvox.net/netcost/sandbox/index4.html
Very strange... cleared everything and it doesn't load in IE8 on my end. The only thing I get on my end is the "Loading Data from Server." message. The interface loads, but no data. I'm at a total loss here.
I confirmed column count in my get_data.php file and the headers in the html. I have 2 fewer fields in my get_data.php file. I have two control columns positioned as the rightmost columns for edit and delete buttons. When I try to add blank fields for these columns at the end of the array in the configuration of the get_data.php file datatables doesn't work in any browser... I assume this is because these are trailing columns and accounting for them in the JSON is unnecessary.
My current array is setup as:
[code]$aColumns = array(' ', 'ID', 'VENDOR', 'BUILDING_CLLI', 'ILEC_CLLI', 'ADDRESS', 'FLOOR','ROOM', 'CITY', 'STATE', 'ZIP', 'NPA', 'NXX', 'LATA', 'LIST_DATE','COUNTRY','LON','LAT','PRICING_MARKET','PRICE_TYPE','PL_DS1','PL_DS3','PL_OC3','PL_OC12','PL_OC48','EPL_FE','EPL_GE','EMAIL','POP','NOTES','SWITCH','HOME_TO','HOME_LAT','HOME_LON','STATUS','ACCURACY','PARTIAL_MATCH');
[/code]
I believe I have it narrowed down to the setup of my array in the above post... and this section in the server side script (I haven't made modifications here):
[code]
/*
* Optional Configuration:
* If you need to add any extra columns (add/edit/delete etc) to the table, that aren't in the
* database - you can do it here
*/
I've identified the problem... my place of employment requires the use of a proxy server. IE apparently doesn't like this. I turn the proxy off and IE works. I turn it back on and IE breaks. Chrome and Firefox work regardless.
I GREATLY appreciate you putting me on the right track. The fact it worked for you in IE 8 from your location and that it worked for me in IE9 at home got me thinking it could be network related. That made me realize it could be the proxy server settings here at work. After a little digging in the forums...
The solution was to add this initialization variable:
[code]"sServerMethod": "POST",[/code]
And to change all instances of "$_GET" to "$_POST" in my server-side script.
Thanks again! I'll be donating very soon. This is an awesome project.
Replies
[code]
var oTable = $('#example').dataTable( {
"bJQueryUI": true,
"bProcessing": true,
"sPaginationType": "full_numbers",
"bServerSide": true,
"sAjaxSource": "get_data.php",
"iDisplayLength": 25,
"fnRowCallback": function( nRow, aData) {
if ( aData[29] == "Y" )
{
var oldAttribute = $(nRow).attr("class");
$(nRow).attr( "class", oldAttribute+"_switch" );
}
},
"oLanguage": {"sLengthMenu": 'Display '+
'25'+
'50'+
'100'+
'250'+
'500'+
'1000'+
' records '},
//"sDom": '<"H"Cfr>t<"F"ip>',
//"sDom": 'C<"clear">lfrtip',
//"sDom": '<"H"Clfr>t<"F"ip>',
"oColVis": {
"aiExclude": [ 0 ], // ID
//"aiExclude": [ 1 ], // VENDOR
//"aiExclude": [ 2 ], // BUILDING_CLLI
//"aiExclude": [ 3 ], // ILE_CLLI
//"aiExclude": [ 4 ], // ADDRESS
"aiExclude": [ 5 ], // FLOOR
"aiExclude": [ 6 ], // ROOM
//"aiExclude": [ 7 ], // CITY
//"aiExclude": [ 8 ], // STATE
//"aiExclude": [ 9 ], // ZIP
//"aiExclude": [ 10 ], // NPA
//"aiExclude": [ 11 ], // NXX
//"aiExclude": [ 12 ], // LATA
"aiExclude": [ 13 ], // LIST_DATE
"aiExclude": [ 14 ], // COUNTRY
"aiExclude": [ 15 ], // LON
"aiExclude": [ 16 ], // LAT
"aiExclude": [ 17 ], // PRICING_MARKET
"aiExclude": [ 18 ], // PRICE_TYPE
"aiExclude": [ 19 ], // PL_DS1
"aiExclude": [ 20 ], // PL_DS3
"aiExclude": [ 21 ], // PL_OC3
"aiExclude": [ 22 ], // PL_OC12
"aiExclude": [ 23 ], // PL_OC48
"aiExclude": [ 24 ], // EPL_FE
"aiExclude": [ 25 ], // EPL_GE
"aiExclude": [ 26 ], // EMAIL
"aiExclude": [ 27 ], // POP
//"aiExclude": [ 28 ], // NOTES
"aiExclude": [ 29 ], // SWITCH
"aiExclude": [ 30 ], // HOME_TO
"aiExclude": [ 31 ], // HOME_LAT
"aiExclude": [ 32 ], // HOME_LON
"aiExclude": [ 33 ], // STATUS
"aiExclude": [ 34 ], // ACCURACY
"aiExclude": [ 35 ], // PARTIAL_MATCH
"aiExclude": [ 36 ], // EDIT
"aiExclude": [ 37 ] // DELETE
},
"aoColumns": [
{
"mDataProp": null,
"sClass": "control center",
"bSortable": false,
"sDefaultContent": ''
},
{ "mDataProp": "1" }, // vendor
{ "mDataProp": "2" }, // Building CLLI
{ "mDataProp": "3" }, // ILEC CLLI/SWC
{ "mDataProp": "4" }, // Address
{ "mDataProp": null, "bVisible": false}, // FLOOR
{ "mDataProp": null, "bVisible": false}, // ROOM
{ "mDataProp": "7" }, // City
{ "mDataProp": "8" }, // State
{ "mDataProp": "9" }, // Zip
{ "mDataProp": "10" }, // NPA
{ "mDataProp": "11" }, // NXX
{ "mDataProp": "12" }, // LATA
{ "mDataProp": null, "bVisible": false}, // LIST_DATE
{ "mDataProp": null, "bVisible": false}, // COUNTRY
{ "mDataProp": null, "bVisible": false}, // LON
{ "mDataProp": null, "bVisible": false}, // LAT
{ "mDataProp": null, "bVisible": false}, // PRICING_MARKET
{ "mDataProp": null, "bVisible": false}, // PRICE_TYPE
{ "mDataProp": null, "bVisible": false}, // PL_DS1
{ "mDataProp": null, "bVisible": false}, // PL_DS3
{ "mDataProp": null, "bVisible": false}, // PL_OC3
{ "mDataProp": null, "bVisible": false}, // PL_OC12
{ "mDataProp": null, "bVisible": false}, // PL_OC48
{ "mDataProp": null, "bVisible": false}, // EPL_FE
{ "mDataProp": null, "bVisible": false}, // EPL_GE
{ "mDataProp": null, "bVisible": false}, // EMAIL
{ "mDataProp": null, "bVisible": false}, // POP
{ "mDataProp": "28", "bSortable": false}, // NOTES
{ "mDataProp": null, "bVisible": false}, // SWITCH
{ "mDataProp": null, "bVisible": false}, // HOME_TO
{ "mDataProp": null, "bVisible": false}, // HOME_LAT
{ "mDataProp": null, "bVisible": false}, // HOME_LON
{ "mDataProp": null, "bVisible": false}, // STATUS
{ "mDataProp": null, "bVisible": false}, // ACCURACY
{ "mDataProp": null, "bVisible": false}, // PARTIAL_MATCH
{ "mDataProp": null,
"bSortable": false,
"sDefaultContent": ''}, // Edit button
{ "mDataProp": null,
"bSortable": false,
"sDefaultContent": ''} // Delete Button
]
[/code]
[code]
} ).columnFilter({
"sPlaceHolder": "head:after",
"bUseColVis": true,
"aoColumns": [
null, // Id
{ }, // Vendor
{ }, // Building CLLI
{ }, // ILEC CLLI/SWC
{ }, // Address
null, // Floor
null, // Room
{ }, // City
{ }, // State
{ }, // Zip
{ }, // NPA
{ }, // NXX
{ }, // LATA
null, // LIST_DATE
null, // COUNTRY
null, // LON
null, // LAT
null, // PRICING_MARKET
null, // PRICE_TYPE
null, // PL_DS1
null, // PL_DS3
null, // PL_OC3
null, // PL_OC12
null, // PL_OC48
null, // EPL_FE
null, // EPL_GE
null, // EMAIL
null, // POP
{ }, // NOTES
null, // SWITCH
null, // HOME_TO
null, // HOME_LAT
null, // HOME_LON
null, // STATUS
null, // ACCURACY
null, // PARTIAL_MATCH
null, // edit button
null // delete button
]
});
[/code]
[code]
<?php
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Easy set variables
*/
/* Array of database columns which should be read and sent back to DataTables. Use a space where
* you want to insert a non-database field (for example a counter or static image)
*/
$aColumns = array( 'ID', 'VENDOR', 'BUILDING_CLLI', 'ILEC_CLLI', 'ADDRESS', 'FLOOR','ROOM', 'CITY', 'STATE', 'ZIP', 'NPA', 'NXX', 'LATA', 'LIST_DATE','COUNTRY','LON','LAT','PRICING_MARKET','PRICE_TYPE','PL_DS1','PL_DS3','PL_OC3','PL_OC12','PL_OC48','EPL_FE','EPL_GE','EMAIL','POP','NOTES','SWITCH','HOME_TO','HOME_LAT','HOME_LON','STATUS','ACCURACY','PARTIAL_MATCH');
/* Indexed column (used for fast and accurate table cardinality) */
$sIndexColumn = "ID";
/* DB table to use */
$sTable = "POP_LIST";
/* Database connection information */
$gaSql['user'] = "*************";
$gaSql['password'] = "*************";
$gaSql['db'] = "*************";
$gaSql['server'] = "*************";
/* REMOVE THIS LINE (it just includes my SQL connection user/pass) */
//include( $_SERVER['DOCUMENT_ROOT']."/datatables/mysql.php" );
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* If you just want to use the basic configuration for DataTables with PHP server-side, there is
* no need to edit below this line
*/
Nothing below was changed.
[/code]
Allan
Chrome:
http://debug.datatables.net/iyatic
IE 8:
http://debug.datatables.net/ehiqav
Allan
Allan
Allan
I confirmed column count in my get_data.php file and the headers in the html. I have 2 fewer fields in my get_data.php file. I have two control columns positioned as the rightmost columns for edit and delete buttons. When I try to add blank fields for these columns at the end of the array in the configuration of the get_data.php file datatables doesn't work in any browser... I assume this is because these are trailing columns and accounting for them in the JSON is unnecessary.
My current array is setup as:
[code]$aColumns = array(' ', 'ID', 'VENDOR', 'BUILDING_CLLI', 'ILEC_CLLI', 'ADDRESS', 'FLOOR','ROOM', 'CITY', 'STATE', 'ZIP', 'NPA', 'NXX', 'LATA', 'LIST_DATE','COUNTRY','LON','LAT','PRICING_MARKET','PRICE_TYPE','PL_DS1','PL_DS3','PL_OC3','PL_OC12','PL_OC48','EPL_FE','EPL_GE','EMAIL','POP','NOTES','SWITCH','HOME_TO','HOME_LAT','HOME_LON','STATUS','ACCURACY','PARTIAL_MATCH');
[/code]
I appreciate all the help,
Trevor
I believe I have it narrowed down to the setup of my array in the above post... and this section in the server side script (I haven't made modifications here):
[code]
/*
* Optional Configuration:
* If you need to add any extra columns (add/edit/delete etc) to the table, that aren't in the
* database - you can do it here
*/
$sOutput = substr_replace( $sOutput, "", -1 );
$sOutput .= "],";
}
[/code]
I GREATLY appreciate you putting me on the right track. The fact it worked for you in IE 8 from your location and that it worked for me in IE9 at home got me thinking it could be network related. That made me realize it could be the proxy server settings here at work. After a little digging in the forums...
The solution was to add this initialization variable:
[code]"sServerMethod": "POST",[/code]
And to change all instances of "$_GET" to "$_POST" in my server-side script.
Thanks again! I'll be donating very soon. This is an awesome project.
Trevor