Isaac
asked on
SharePoint MasterPage and Javscript error
Hello all,
I'm working on a client request to allow them to edit a mission statement place in the header and edit the footer. What comes to mind to allow this to happen is using SPServices to show the information from a list. Right now, instead of placing javascript file it in a CEWP, I wanted place it in the masterPage so that it can carry through out the website. Unfortunately, I keep getting errors when I try to reference my javascript file.
I get a "Cannot make a cache safe URL" when I reference use <SharePoint:ScriptLink>, a "Syntax Error" when using a <script> tag and it doesn't show up at all when I reference the the file in <asp:ContentPlaceHolder id="PlaceHolderAdditionalP ageHead" runat="server"> tag. Thanks
I'm using a javascript test file that has an alert("I'm in"); that I have tested and I know it works. I may be missing something on how to reference a javascript file in a SharePoint masterpage. Please let me know if I'm doing something wrong.
I'm working on a client request to allow them to edit a mission statement place in the header and edit the footer. What comes to mind to allow this to happen is using SPServices to show the information from a list. Right now, instead of placing javascript file it in a CEWP, I wanted place it in the masterPage so that it can carry through out the website. Unfortunately, I keep getting errors when I try to reference my javascript file.
I get a "Cannot make a cache safe URL" when I reference use <SharePoint:ScriptLink>, a "Syntax Error" when using a <script> tag and it doesn't show up at all when I reference the the file in <asp:ContentPlaceHolder id="PlaceHolderAdditionalP
I'm using a javascript test file that has an alert("I'm in"); that I have tested and I know it works. I may be missing something on how to reference a javascript file in a SharePoint masterpage. Please let me know if I'm doing something wrong.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I've seen this before when the encoding was different. Open your file in Notepad and try saving it as ANSI and UTF8 and see if that changes things. Failing on the first character can hint at something like that.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I'm not sure why you would use SPServices when a straight forward dataview webpart would do the same job here.
ASKER