Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have an issue where scripts are loading multiple times causing the Welcome menu (by the users name in the header) to have multiple references "My profile" and "My Site"

I have the issue on both the custom master page and the unmodified v4.master inspecting with firebug reveals SP.UI.MyLinksRibbon.js being loaded dynamically multiple times.

<script type="text/javascript" src="/_layouts/SP.UI.MyLinksRibbon.js"></script>
<script type="text/javascript" src="/_layouts/SP.UI.MyLinksRibbon.js"></script>
share|improve this question
    
Still no answer to this... –  Ben Shoemate May 1 '12 at 0:14
add comment

1 Answer 1

This problem on occurs when images are loaded into a custom webpart via a javascript template. I think the scriptmanager:

<asp:ScriptManager id="ScriptManager" runat="server"  
     EnablePageMethods="false" EnablePartialRendering="true"
     EnableScriptGlobalization="false" 
     EnableScriptLocalization="true" />

This includes a call to ExecuteOrDelayUntilScriptLoaded(_myLinksRibbonLoad2, 'SP.Ribbon.js'); The js returns a "loaded" response to the function for each image which causes it to fire each time, loading the script into the header.

share|improve this answer
    
I tried loading the images only after the page loads with a jquery ready block. The problem still occurs. Something in the load event is trigging the script to get loaded muliple times. –  Ben Shoemate May 1 '12 at 0:15
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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