SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

Try to load it ofter SP.js with executeOrDelayUntilScriptLoaded that should do the trick have a look here

share|improve this answer

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

Your Answer


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