When I click manage permission button in ecb menu in a list a new user.aspx page is opened. I want to open this page in modal dialog. How can I do it? I know about msdn and this solutions, but the second doesn't work for me. I want to open user.aspx page in modal dialog only for one application page.

2 Answers 2


This should get you going.


    //Using the DialogOptions class.
    var options = SP.UI.$create_DialogOptions();

    options.title = "My Dialog Title";
    options.width = 400;
    options.height = 600;
    options.url = "/_layouts/DialogPage.aspx";


//Using a generic object.
var options = {
title: "My Dialog Title",
width: 400,
height: 600,
url: "/_layouts/DialogPage.aspx" };


Here try this site http://kancharla-sharepoint.blogspot.com/2012/07/sharepoint-model-dialog-from-ribbon.html

    <!--?xml version="1.0" encoding="utf-8"?-->

    <commanduihandler command="ShowAlert" commandaction="javascript:
                      function demoCallback(dialogResult, returnValue)
            SP.UI.Notify.addNotification('Operation Successful!');


          var options = {             
            url: '/_layouts/Settings.aspx',
            tite: 'Move Documents',
            allowMaximize: false,
            showClose: true,
            width: 800,
            height: 600,
            dialogReturnValueCallback: demoCallback };


  • Thank you the answer, but I know how to create model dialogs. I don't know how to open user.aspx page when clicking 'manage permission' item in Edit Control Block menu. This item is created dynamically in core.js. I am looking for the jquery solution or something else.
    – andDaviD
    Oct 8, 2012 at 15:15
  • Wow is there someway that you could get the id of the button after it is created and override the click event and produce the dialog yourself. Oct 8, 2012 at 15:28
  • I believe you can use this blog to get you going. kancharla-sharepoint.blogspot.com/2012/07/… Oct 8, 2012 at 15:31
  • I can't go to this link, i have a message: "Moved Temporarily The document has moved here". As for the second comment, I am trying to use jquery live() and attr() methods, but attr() method doesn't work. I can't recognize why.
    – andDaviD
    Oct 8, 2012 at 16:24
  • I know JQuery Live and attr will not work it is a known issue about how SP changes the ID's of elements. Try this link again kancharla-sharepoint.blogspot.com/2012/07/… also Please note that I am using a CommanduiHandler which is what you should be using to handle the click event of the custom button and within that event you should be able to call the user.aspx page within a dialog passing any required parameters. This is the easiest solution to keep from tracking id's using jquery Oct 8, 2012 at 16:39

Here is how I have done it in the past:

1)Include a script on your page which will attach a custom "click" event on all the ECB buttons (the ones with the downward arrow image). The class you can use as selector for the ECB button is s4-ctx

2) Inside that custom event, write another function which will look for the "Manage Permissions" span with id as ID_MngPerms and change it's click event to open the modal dialog box with the permissions page inside.

The way this will work is that the ECB menu is loaded on the page only after the ECB button is clicked. So we will be able to get it using jQuery only after the click event of the ECB is fired.

Here is some starting code for you:

    //Attach custom click event to ECB buttons
        //Remove any default function from the Manage Permissions link.
        //Attach custom function.
            //Open Modal Dialog box.
  • Thank you for your solution. But unbind method doesn't work. So, at first dialog box is loading and then it stops loading and microsoft's manage permission page is opened instead of mine.
    – andDaviD
    Oct 9, 2012 at 11:01
  • 1
    you can use $("#ID_MngPerms").attr("onclick",null); instead of unbind Oct 9, 2012 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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