0

I'm using a CEWP in SharePoint 2010 to link to an HTML file via the Content Link however the jQuery seems to only run while the page is in Edit mode. The HTML is displaying, but none of the content that is created via jQuery is showing. Things to note:

  • The "Hidden" web part property is NOT selected
  • My script links include "text='text/javascript'"
  • The exact same HTML file works in my Dev Environment, but not Test
  • The permissions for the site are identical in Dev and Test
  • None of the other web parts on the page are working either until I put the page in Edit mode however if I delete the web part in question, the other web parts start working outside of Edit mode.

The HTML file code is this:

<script type='text/javascript' src='/SiteAssets/jquery-1.6.2.min.js' ></script>

<style type="text/css">

#lineComment{
 width:10px;
 height:10px;
 padding-left: 3px;
}

 #tripReclose{
 float:left;
 margin-right:7px; 
}

#tripReclose th{
 padding-right:7px;
 text-align:left;
}

#tripReclose td, #openBreaker td{
 /*border-left:thin #E5E5E5 solid;
 border-right:thin #E5E5E5 solid;*/
 border-top:thin #E5E5E5 solid;
 border-bottom:thin #E5E5E5 solid;
}

#tripReclose caption{
 text-align:left;
 font-weight:bold;
 padding-top:5px;
 padding-bottom:5px;
}

#openBreaker{
 float:left;
}

#openBreaker th{
 padding-right:7px;
 text-align:left;
}


#openBreaker caption{
 text-align:left;
 font-weight:bold;
 padding-top:5px;
 padding-bottom:5px; 
}
</style>


<div id="lineStatus">
 <table id="tripReclose">
  <caption>Trip and Reclose Events</caption>
  <tbody>
   <tr>
    <th>Service Point</th><th>Event Date</th><th>Fault Target</th><th>Device jquery-1.6.2.minName</th>
   </tr>
  </tbody>
 </table>
 <table id="openBreaker">
  <caption>Open Breaker Events</caption>
  <tbody>
   <tr>
    <th>Service Point</th><th>Open Date</th><th>Close Date</th><th>Device Name</th><th>PLT Assigned</th>
   </tr>

  </tbody>
 </table>
 
</div>


<script type="text/javascript">

 /* Run custom JavaScript that retrieves list items via CAML - I cannot specify this code but can guarantee it works */  

</script>
Dana Victoria
  • 71
  • 1
  • 1
  • 10
  • Have you tried to use IE Developer tool (press f12 and debug script with breakpoints) to see any script error ? – Godwin Nov 04 '14 at 15:18

1 Answers1

0

Turns out, another web part was referencing a jquery file that was not in the site assets folder. I replaced that file at root (where it was looking) and the issue was resolved.

Dana Victoria
  • 71
  • 1
  • 1
  • 10