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

I need to do some client-side alterations to some of the application pages, specifically the permission page (User.aspx). I need the javascript file to remove the "Administrate Parent Permissions" link as a lot of human errors occur because of this.

However, I have found no easy way to 1) put javascript into a master page (and I don't want to edit application.master manually), or 2) dynamically load a javascript on the application.master pages.

The solution is already making use of a custom master page for normal pages that already have scripts included, but this is specifically for application pages only (to the extent possible).

I saw a solution using a HttpModule to dynamically replace the master file on-the-fly, but it seems like a very inefficient way to do it.

Any suggestions are welcome. The end result must just be that the specific menu item is removed from the actions menu on the permissions page. I have tried using HideCustomAction, but it will not work for that specific menu item (it is working fine for others).

share|improve this question
up vote 4 down vote accepted

You don't need to touch the masterpage at all. Just create a custom SharePoint DelegateControl as described here

The DelegateControl contains a link to include your script. Once the feature is activated it attaches to any masterpage, even the application.master.

share|improve this answer

You can directly push your script in the Master Page with the CustomAction Element. No need to modify the Master Page manually. Have a look here:

I prefer this way because it does not involve touching the 12/14 hive folders.

share|improve this answer
Brilliant! I always forget this feature, thanks for reminding me. Sadly it works only with SharePoint 2010, but from what I gather the original poster has SharePoint 2007. Well, we'll see what's true once he replies back. – Sig Weber Jan 30 '12 at 21:15
Yes true. If its 2007, then the delegate control it is! – Vardhaman Deshpande Jan 31 '12 at 5:45

Your Answer


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.