Javascript code in JSON data source not work in Safari/IE
Javascript code in JSON data source not work in Safari/IE
mathie
Posts: 36Questions: 0Answers: 0
Hello,
I use dynamic data loading via JSON/AJAX. For testing, I have a very simple, one row, one col. So the single data cell has an alert('ok');
In Firefox, it's expected, the dialog box pops up. In Safari, IE, nothing happens.
Please let me know if there is any special considerations for this case (like DataTables does any manipulation to the data)
I use dynamic data loading via JSON/AJAX. For testing, I have a very simple, one row, one col. So the single data cell has an alert('ok');
In Firefox, it's expected, the dialog box pops up. In Safari, IE, nothing happens.
Please let me know if there is any special considerations for this case (like DataTables does any manipulation to the data)
This discussion has been closed.
Replies
[code]
nTd = document.createElement('td');
if ( typeof oSettings.aoColumns[i].fnRender == 'function' )
{
var sRendered = oSettings.aoColumns[i].fnRender( {
"iDataRow": iThisIndex,
"iDataColumn": i,
"aData": aData,
"oSettings": oSettings
} );
nTd.innerHTML = sRendered;
if ( oSettings.aoColumns[i].bUseRendered )
{
/* Use the rendered data for filtering/sorting */
oSettings.aoData[iThisIndex]._aData[i] = sRendered;
}
}
else
{
nTd.innerHTML = aData[i];
}
[/code]