3

Datatables is working for internal salesforce users where as same page with datatables is not working for customer communities users.

Failed to load resource: the server responded with a status of 404 (Not Found)

enter image description here

<apex:page standardController="Team__c" extensions="AssignJobs">
  <head>
        <apex:includescript value="//code.jquery.com/jquery-1.11.1.min.js" / >
        <apex:includescript value="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js" />
        <apex:stylesheet value="//cdn.datatables.net/1.10.4/css/jquery.dataTables.css" />
        <apex:includescript value="//cdn.datatables.net/plug-ins/1.10.12/sorting/date-de.js"/>
        <script>
            j$ = jQuery.noConflict();
            j$(document).ready( function () {
                var jobTable = j$('[id$="jobtable"]').DataTable({

                });
            });
        </script>
    </head>
  <apex:form >
  <apex:pageBlock >
  <apex:pageBlockSection >
  <apex:outputField value="{!Team__c.Name}"/>
  <apex:outputField value="{!Team__c.Start_Date__c}"/>
  <apex:outputField value="{!Team__c.End_Date__c}"/>
  </apex:pageBlockSection>
  </apex:pageBlock>
  <apex:pageBlock >
            <apex:pageBlockButtons >
                <apex:commandButton value="Assign Jobs to Team" action="{!processSelected}" rerender="table"/>
                <apex:commandButton value="Cancel" action="{!cancel}"/>
            </apex:pageBlockButtons>  
    <table id="jobtable" class="display">
            <thead>
                <tr>
                    <th>Action</th> 
                    <th>Job Name</th>
                    <th>Location </th>
                    <th>Scheduled Date</th>
                    <th>Team</th>
                </tr>
            </thead>
              <tbody>
                <apex:repeat value="{!JListWrapper}" var="jwrap">
                    <tr>
                        <td><apex:inputCheckbox value="{!jwrap.selected}" id="inputId"/></td> 
                        <td>{!jwrap.job.Name}</td>
                        <td>{!jwrap.job.Location__r.name}</td>
                        <td>
                        <apex:outputText value="{0,date,MM'/'dd'/'yyyy}">
                        <apex:param value="{!jwrap.job.SCHEDULED_DATE__c}" /> 
                        </apex:outputText>
                        </td>
                        <td>{!jwrap.job.Team__r.name}</td>
                     </tr>   
                </apex:repeat> 
            </tbody>
        </table>

  </apex:pageBlock>
  </apex:form>
 </apex:page>
1
  • 1
    There's no reason to leave out the protocol...include the https:
    – Adrian Larson
    Apr 18, 2017 at 0:05

1 Answer 1

2

Just include the protocol (https:):

<apex:includeScript value="https://code.jquery.com/..." />
<!-- etc. -->

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .