table populating but still adding a row with "no data available in this Table" - Mac Safari only
table populating but still adding a row with "no data available in this Table" - Mac Safari only
Hi,
I am having this issue where the table is populating but adding a row at the bottom only in mac safari stating "no data available in this Table". Also my sorting is not working at all on the column headers. I am getting my information sent back to me from a json file. Everything works perfectly in all the other browsers. Any help would be great. My code looks like this:
$(document).ready(function() {
$.ajax({
type: "GET",
url: "/core/index.cfm/admin.BusinessCategory.list",
data: "{}",
dataType: "json",
success: function (data) {
saveSuccess = data.translations.filterview;
emptySystemMessage = data.translations.zerobusinesscategoriesmessage;
if(data.listbusinesscategories.length != 0){
//append header section with data
$('#businessCategoriesToolbar').tmpl(data).appendTo($('#outerContainerToolbar'));
$('#businessCategoryHeaderSection').tmpl(data).appendTo($('.businessCategoryHeaders'));
//append the rows with the data
$('#businessCategoriesRow').tmpl(data).appendTo($('#businessCategoriesContent'));
$('#businessCategoriesDialog').tmpl(data).appendTo($('body'));
$('#businessCategoriesEditDialog').tmpl(data).appendTo($('body'));
checkStatus();
$('.datagrid-header-businessCategory, .datagrid-header-menu').click(function(){
checkStatus();
});
$('#listBusinessCategories').dataTable({
"sScrollY":"446px",
"bAutoWidth": false,
"bPaginate":false,
"bDeferRender": true,
"aaSorting": [],
"aoColumns":[
{ "sType": "string" },
{ "sType": "string" },
{ "sType": "num-html" }
],
"bDestroy":true
});
}else{
$('#businessCategoriesToolbar').tmpl(data).appendTo($('#outerContainerToolbar'));
$('#businessCategoryHeaderSection').tmpl(data).appendTo($('.businessCategoryHeaders'));
//append the rows with the data
$('#businessCategoriesRow').tmpl(data).appendTo($('#businessCategoriesContent'));
$emptyCategoryCell = ' ';
$emptyStatusCell = ' ';
$emptyDisplayOrderCell = ' ';
//append extra rows with no data inside
for(i=0;i<10;i++){
$('#businessCategoriesContent').append('' + $emptyCategoryCell + $emptyStatusCell + $emptyDisplayOrderCell + '
I am having this issue where the table is populating but adding a row at the bottom only in mac safari stating "no data available in this Table". Also my sorting is not working at all on the column headers. I am getting my information sent back to me from a json file. Everything works perfectly in all the other browsers. Any help would be great. My code looks like this:
$(document).ready(function() {
$.ajax({
type: "GET",
url: "/core/index.cfm/admin.BusinessCategory.list",
data: "{}",
dataType: "json",
success: function (data) {
saveSuccess = data.translations.filterview;
emptySystemMessage = data.translations.zerobusinesscategoriesmessage;
if(data.listbusinesscategories.length != 0){
//append header section with data
$('#businessCategoriesToolbar').tmpl(data).appendTo($('#outerContainerToolbar'));
$('#businessCategoryHeaderSection').tmpl(data).appendTo($('.businessCategoryHeaders'));
//append the rows with the data
$('#businessCategoriesRow').tmpl(data).appendTo($('#businessCategoriesContent'));
$('#businessCategoriesDialog').tmpl(data).appendTo($('body'));
$('#businessCategoriesEditDialog').tmpl(data).appendTo($('body'));
checkStatus();
$('.datagrid-header-businessCategory, .datagrid-header-menu').click(function(){
checkStatus();
});
$('#listBusinessCategories').dataTable({
"sScrollY":"446px",
"bAutoWidth": false,
"bPaginate":false,
"bDeferRender": true,
"aaSorting": [],
"aoColumns":[
{ "sType": "string" },
{ "sType": "string" },
{ "sType": "num-html" }
],
"bDestroy":true
});
}else{
$('#businessCategoriesToolbar').tmpl(data).appendTo($('#outerContainerToolbar'));
$('#businessCategoryHeaderSection').tmpl(data).appendTo($('.businessCategoryHeaders'));
//append the rows with the data
$('#businessCategoriesRow').tmpl(data).appendTo($('#businessCategoriesContent'));
$emptyCategoryCell = ' ';
$emptyStatusCell = ' ';
$emptyDisplayOrderCell = ' ';
//append extra rows with no data inside
for(i=0;i<10;i++){
$('#businessCategoriesContent').append('' + $emptyCategoryCell + $emptyStatusCell + $emptyDisplayOrderCell + '
This discussion has been closed.
Replies
Allan
Unfortunately, I dont have anything set up so that testing can take place externally. I work for a company that builds content management systems. I have put all of my code here baring the json file
http://jsfiddle.net/HGnH5/3/
I am receiving no javascript errors in the console at all