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

On my master page i have a tag cloud web part.

I use jquery to redirect tags to search center. I reference it in my master page:

<script type="text/javascript" src="/_layouts/project/js/addons.js"></script>

I tested the script with the console in firebug and it works like a charm. but it seems that the addons.js gets loaded before http://url/_vti_bin/SocialDataService.asmx/GetAllTagTerms

Therefore the redirection doesn't work.

Any ideas on how i could load the script after http://url/_vti_bin/SocialDataService.asmx/GetAllTagTerms

share|improve this question

2 Answers 2

Lars's answer is the ay to go probably, if you want a call to your own js function to happen directly after any out of the box js function call, expand the Lars's answer (load the actual js file after the needed out of the box js file) with jQUery.aop. This allows for "extending" other js function by adding a before or after call to it!

share|improve this answer

Try to load it ofter SP.js with executeOrDelayUntilScriptLoaded that should do the trick have a look here http://blog.lekman.com/2010/05/working-safely-with-sharepoint-client.html

share|improve this answer

Your Answer

 
discard

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