Email: info@zenconix.com

Show Model Dialog in SharePoint 2013

Published on: 07/30/14 3:30 PM

Category:SharePoint 2013 SP.UI Tags:

SP.UI.ModelDialog Class

This Represents a modal dialog.

SP.UI.ModalDialog

SP.UI.ModelDialog.showWaitScreenSize(title, message, callbackFunc, height, width) Method

This displays a wait screen dialog that has a Cancel button using the specified parameters.

var value = SP.UI.ModalDialog.showWaitScreenSize(title, message, callbackFunc, height, width);

Parameters

titleThe title of the wait screen dialog.

messageThe message that is shown in the wait screen dialog.

callbackFuncThe callback function that runs when the wait screen dialog is closed.

height:  The height of the wait screen dialog.

widthThe width of the wait screen dialog.

Returns

A modal dialog with the specified parameters.

Remark

This method displays a wait screen dialog that can be closed manually. The callback function specified by the callbackFuncparameter will run when the modal dialog closes.

Function can be written as

     function waitWithClose(){            
                    SP.UI.ModalDialog.showWaitScreenSize("Title" ," Message");  
             }

waitWIthClose

SP.UI.ModelDialog.showWaitScreenWithNoClose(title, message, height, width) Method

This displays a wait screen dialog that does not have a Cancel button using the specified parameters.

 

var value = SP.UI.ModalDialog.showWaitScreenWithNoClose(title, message, height, width);

Parameters

titleThe title of the wait screen dialog.

message: The message that is shown in the wait screen dialog.

height: The height of the wait screen dialog.

width: The width of the wait screen dialog.

Returns 

A modal dialog with the specified parameters.

Remark

This method opens a wait screen dialog that cannot be closed manually.

Function can be written as

  function showWaitWithNoClose()        {
          SP.UI.ModalDialog.showWaitScreenWithNoClose("Title" ,"Please wait this is body");        
}
waitWithNoClose



Leave a Reply

Your email address will not be published. Required fields are marked *

Related Posts

Gets a username from SharePoint’s User profile service

Here is script of “How to get username from user id from Active directory”   [code language=”css”] // get user name from id function getUserFromId(userid) { // var userid = _spPageContextInfo.userId; var requestUri = _spPageContextInfo.webAbsoluteUrl + "/_api/web/getuserbyid(" + userid + ")"; var requestHeaders = { "accept": "application/json;odata=verbose" }; $.ajax({ url: requestUri, async: false, contentType: "application/json;odata=verbose", […]

Get the User ID of Active Directory name in SharePoint by Javascript

How to get User Id from Site User if you have User’s active directory name [code language=”css”] //Get the id of user from AD name. function getADNameId(adName) { var UserData; $.ajax({ url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/SiteUsers?$Select=Id,Title&$filter=Title eq ‘" + adName + "’", type: "GET", async: false, headers: { "accept": "application/json;odata=verbose", "content-type": "application/json;odata=verbose" }, success: function (data) { […]

Get selected element Id from Task List

“Very BAD practices !!!”  Sometimes situation comes that you don’t have any other options but you have to work on it and get work done. If this situation comes then you are just searching for any possible solution (many times you know that it is wrong approch to do so…).  I have come across the situation, […]