In SharePoint 2010, I was able to hide the links for editing, deleting... an existing survey entry in the DispForm.aspx page using the following technique:
1 - Save jquery .js file to the Style Library in the top level site
2 - Save the .js file that has the jquery code to hide the link in the Style Library in the top level site
3 - Reference the .js files in the DispForm.aspx page like this:
<asp:content contentplaceholderid="PlaceHolderAdditionalPageHead" runat="server">
<script type="text/javascript" language="javascript" src='<asp:Literal runat="server" Text="<%$SPUrl:~SiteCollection/Style Library/jquery-1.5.0.min.js%>"'></script>
<script type="text/javascript" language="javascript" src='<asp:Literal runat="server" Text="<%$SPUrl:~SiteCollection/Style Library/hideedit.js%>"'></script>
</asp:content>
The hideedit.js file contains the following:
$(document).ready(function(){
$('#ctl00_m_g_d3bec7ca_bd25_448d_8874_da35856854c5_ctl00_ctl01_ctl00_toolBarTbl').hide();
});
I am trying to use this same technique in SharePoint 2013 but it is not working.
It appears that neither of the js files are loading properly.
As a test, I put the following in the hideedit.js:
alert('test');
$(document).ready(function(){
alert('from jquery');
});
Neither of the alerts are displayed when navigating to the DispForm.aspx file.
How do I get JQuery loaded in a survey DispForm.aspx file in SharePoint 2013?