0

I'm attempting to follow the instructions from this post.

I've added the Sharepoint links to call the JS files however it seems that they are not included by viewing network activity in my broswer. I also can't seem to find these files anywhere on the server. I get no errors in my console.

Below is a copy of what my aspx file looks like:

<%@ Page Inherits="Microsoft.SharePoint.Publishing.TemplateRedirectionPage,Microsoft.SharePoint.Publishing,Version=14.0.0.0,Culture=neutral,PublicKeyToken=71e9bce111e9429c" %> <%@ Reference VirtualPath="~TemplatePageUrl" %> <%@ Reference VirtualPath="~masterurl/custom.master" %><%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

SharePoint:ScriptLink name="clienttemplates.js" runat="server" LoadAfterUI="true" Localizable="false"/>
<SharePoint:ScriptLink name="clientforms.js" runat="server" LoadAfterUI="true" Localizable="false"/>
<SharePoint:ScriptLink name="clientpeoplepicker.js" runat="server" LoadAfterUI="true" Localizable="false"/>
<SharePoint:ScriptLink name="autofill.js" runat="server" LoadAfterUI="true" Localizable="false"/>
<SharePoint:ScriptLink name="sp.js" runat="server" LoadAfterUI="true" Localizable="false"/>
<SharePoint:ScriptLink name="sp.runtime.js" runat="server" LoadAfterUI="true" Localizable="false"/>
<SharePoint:ScriptLink name="sp.core.js" runat="server" LoadAfterUI="true" Localizable="false"/>

<html xmlns:mso="urn:schemas-microsoft-com:office:office" xmlns:msdt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882"><head>
<!--[if gte mso 9]><SharePoint:CTFieldRefs runat=server Prefix="mso:" FieldList="FileLeafRef,Comments,PublishingPreviewImage,PublishingHidden,_PublishingMigratedGuid,PublishingAssociatedContentType,PublishingAssociatedVariations,ReusableContent01,ReusableContent02,ReusableContent03,ReusableContent04,ReusableContent05,ReusableContent06"><xml>
<mso:CustomDocumentProperties>
<mso:PublishingContact msdt:dt="string">33670</mso:PublishingContact>
<mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_PublishingContact msdt:dt="string">Dave Maietta</mso:display_urn_x003a_schemas-microsoft-com_x003a_office_x003a_office_x0023_PublishingContact>
<mso:PublishingContactPicture msdt:dt="string"></mso:PublishingContactPicture>
<mso:PublishingContactName msdt:dt="string"></mso:PublishingContactName>
<mso:ContentTypeId msdt:dt="string">0x01010007FF3E057FA8AB4AA42FCB67B453FFC100E214EEE741181F4E9F7ACC43278EE81100E4632162F09D9946B470959B43B2391B003D704FE3DEA833468B05857CA4326220</mso:ContentTypeId>
<mso:Comments msdt:dt="string"></mso:Comments>
<mso:PublishingContactEmail msdt:dt="string"></mso:PublishingContactEmail>
<mso:PublishingPageLayout msdt:dt="string">https://connect.gsk.com/sites/pharma_eu/_catalogs/masterpage/GSK_2013_Brand_PharmaEU_Awards.aspx, /sites/pharma_eu/_catalogs/masterpage/GSK_2013_Brand_PharmaEU_Awards.aspx</mso:PublishingPageLayout>
<mso:PublishingHidden msdt:dt="string">0</mso:PublishingHidden>
<mso:ReusableContent04 msdt:dt="string"></mso:ReusableContent04>
<mso:ReusableContent02 msdt:dt="string"></mso:ReusableContent02>
<mso:ReusableContent01 msdt:dt="string">&lt;h2 class=&quot;ms-rteElement-H2&quot;&gt;Submit a Nomination&lt;/h2&gt;
​</mso:ReusableContent01>
<mso:ReusableContent06 msdt:dt="string"></mso:ReusableContent06>
<mso:ReusableContent03 msdt:dt="string"></mso:ReusableContent03>
<mso:ReusableContent05 msdt:dt="string"></mso:ReusableContent05>
<mso:RequiresRouting msdt:dt="string">False</mso:RequiresRouting>
</mso:CustomDocumentProperties>
</xml></SharePoint:CTFieldRefs><![endif]-->
<title>Submit a Nomination</title></head>
2
  • 1
    There is an error in your ASPX on line 3, no opening <. I assume it's not like that in your actual solution... Commented Mar 19, 2014 at 17:05
  • 1
    Also, look in the Template\LAYOUTS folder under 15, usually C:\Program Files\Common files\Microsoft Shared\Web Server Extensions\15 Commented Mar 19, 2014 at 17:08

1 Answer 1

1

You have to put the ScriptLinks in an asp:Content control (most likely you want the "PlaceHolderAdditionalPageHead" place holder).

<asp:Content runat="server" ContentPlaceHolderId="PlaceHolderAdditionalPageHead">
    <SharePoint:ScriptLink name="clienttemplates.js" runat="server" LoadAfterUI="true" Localizable="false"/>
    <SharePoint:ScriptLink name="clientforms.js" runat="server" LoadAfterUI="true" Localizable="false"/>
    <SharePoint:ScriptLink name="clientpeoplepicker.js" runat="server" LoadAfterUI="true" Localizable="false"/>
    <SharePoint:ScriptLink name="autofill.js" runat="server" LoadAfterUI="true" Localizable="false"/>
    <SharePoint:ScriptLink name="sp.js" runat="server" LoadAfterUI="true" Localizable="false"/>
    <SharePoint:ScriptLink name="sp.runtime.js" runat="server" LoadAfterUI="true" Localizable="false"/>
    <SharePoint:ScriptLink name="sp.core.js" runat="server" LoadAfterUI="true" Localizable="false"/>
</asp:Content>

You shouldn't be including your own <html> tag either... Your best bet is to follow Robert's suggestion and look at an existing page's markup for a template and make the changes that you need from there.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.