1

I'm building a Visualforce page with some JavaScript to build a content DataTable based off the following example: http://www.verticalcoder.com/2014/11/21/datatables-in-visualforce-part-1/

This page works well and looks great in Salesforce, but when I try to open it in the community it looks like the JavaScript is not working. The page references the same public static resource file, so I'm not sure why this would work in Salesforce and not the community.

Any help would be greatly appreciated.

Edit: This question is NOT a duplicate of the one listed. As I said, I set the static resource to public.

Thanks!

dth02134
  • 183
  • 6
  • 1
    If you are not using static resources for the JavaScript, take a look in the "Network" tab (and "Console" tab) of your browser's developer tools to check what is going wrong. See How do I start to debug my own Visualforce/JavaScript?. – Keith C May 31 '15 at 23:02
  • What is the error you are getting in java script console in your browser ? – Dave Jun 01 '15 at 02:25
  • Hi Dave, Thanks for responding. The error in the console is below. Like I said, the JS referenced is a public static resource, yet this only happens when I try the page in my community. It works great when accessed in Salesforce.

    Uncaught TypeError: j$(...).DataTable is not a function(anonymous function) @ Battlecards:256m.Callbacks.j @ jquery.min.js:2m.Callbacks.k.fireWith @ jquery.min.js:2m.extend.ready @ jquery.min.js:2J @ jquery.min.js:2

    – dth02134 Jun 01 '15 at 02:47
  • That looks like the DataTables JavaScript has not been found. Have you checked for loading errors in your browser's "Network" tab? – Keith C Jun 01 '15 at 13:54

0 Answers0