0

I am trying to make carousel in google site using Google Apps Script. This carousel includes text messages that would be changed dynamically. I am using jquery to implement this but GAS HtmlService api is not able to evalute that js script files.

I used http://flexslider.com carousel in my application. But its not working. I also tried with caja playground but it does not have carousel implementation js file. I upload all required js files to google cloud storage and made them public.

 <script type="text/javascript" src="http://commondatastorage.googleapis.com/shCore.js"></script>
 <script type="text/javascript" src="http://commondatastorage.googleapis.com/shBrushXml.js"></script>
<script type="text/javascript" src="http://commondatastorage.googleapis.com/shBrushJScript.js"></script>

 <!-- Optional FlexSlider Additions -->
<script src="http://commondatastorage.googleapis.com/jquery.easing.js"></script>
<script src="http://commondatastorage.googleapis.com/jquery.mousewheel.js"></script>
<script defer src="http://commondatastorage.googleapis.com/demo.js"></script>

Any suggestion to implement this?

Ruchi Agarwal
  • 543
  • 3
  • 8
  • 18

1 Answers1

1

It is because of Caja which sanitizes the script and filters some of the code from your js. Check here for details.

Alternatively, you can use Google Drive Webhost to publish your carousel and then embed it in Google Site using publicly available iFrame gadget. Check a similar demo here https://sites.google.com/site/appsdatepicker/test-page-2

Waqar Ahmad
  • 3,716
  • 1
  • 16
  • 27
  • Thanks Waqar for your quick reply. I also worked with this approach. For this i have created a google presentation with required effects and then published it on web then added to my google site as a gadget. It was working well. But i want to update content of presentation dynamically . Means each slide would be get text from the google apps script dynamically. Have you any solution to change or upload google presentation's content?? – Ruchi Agarwal Dec 03 '12 at 10:54
  • Hello Ruchi Ji, I am not sure if you understood me correctly. I am not talking about any Google presentation. It is a simple JS and html files uploaded in Google Drive in a public folder which is then accessesd through weblink link like (https://googledrive.com/host/PUBLIC_FOLDER_ID_HERE), which is then embedded in Google Site using iFrame Gadget. These links may help you. http://goo.gl/5XR6u – Waqar Ahmad Dec 03 '12 at 12:50
  • Thank you Waqar Ji, now i understood your answer perfectly. I didn't know about the google webhosting, but now i got it. Thanks a tonne. – Ruchi Agarwal Dec 04 '12 at 05:52
  • @Frederic I'll recommend you to ask this question in Google Drive Product forum (http://productforums.google.com/forum/#!forum/drive) – Waqar Ahmad Mar 12 '13 at 18:27