OS: windows 7
Browser: Firefox and Chrome
I have a few pages on my google site that use google apps script to collect data from a spreadsheet and display them on the page as part of the Google Apps Scripts Gadget. Recently, (within the last few days), the information that it is supposed to display from the spreadsheet is not showing up. It's just blank. The rest of the script seems to run fine, but it's difficult to tell.
I haven't changed any of the code since the last working version (I've been using this setup and code for around 2 months and it worked almost perfectly before). I debugged the functions that get the data and they are still working fine, and the data is in the same format as it was previously.
Here's the code I've been using if that helps. Site traffic is around 200 visits per month if that matters.
function doGet() {
var t=HtmlService.createTemplateFromFile('Practices');
return t.evaluate();
}
function getData() {
var sheet=SpreadsheetApp.openById('CORRECT SPREADSHEET KEY').getSheetByName('Practices');
return sheet.getDataRange().getValues();
}
And this is the block of code in the Practices.html file that I believe is not working. (none of this data is showing up, but the rest of it is)
<div class="carousel" style="display:none;">
<div class="items">
<? var date= new Date(); ?>
<? var data = getData();
for (var i = 1; i < data.length; ++i) { ?>
<div>
<h3><?= data[i][0] ?></h3>
<p>Date: <?=data[i][1].getMonth()+1 ?>/<?=data[i][1].getDate()?>/<?=data[i][1].getFullYear() ?></p>
<p><?= data[i][2] ?> </p>
</div>
<? } ?>
</div>
</div>
I am aware there is a display:none; in this code. It is switched to show later. For some reason if the display:none; is not there it only displays the first slide, but none of the slides after it.
UPDATE: Inspected the html of the page and all the data is there, with the proper tags and structure. This led me to think it was the jquery scripts I use to animate and change the display setting. I created another page with the same jquery functions, but without having to get data from the spreadsheet and it worked fine. Although, this was not through the apps script gadget.