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

Lynds007Lynds007 Posts: 3Questions: 0Answers: 0
edited July 2011 in General
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 + '

Replies

  • allanallan Posts: 63,248Questions: 1Answers: 10,420 Site admin
    Are you getting any Javascript errors on the console? Can you give us a link please?

    Allan
  • Lynds007Lynds007 Posts: 3Questions: 0Answers: 0
    Hi 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
  • Lynds007Lynds007 Posts: 3Questions: 0Answers: 0
    This issue, I have managed to resolve. Thank you
  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    What was the solution?
This discussion has been closed.