SharePoint 2010 Modal Dialog JavaScript internal functions

SharePoint 2010 Modal Dialog Basics

I have probably already worked with the Dialog Framework in a SharePoint 2010 environment. These dialogs are a very interesting feature that I really love. They can be used for a lot of things and of course you can create your owns dialogs to display data or ask for user input.

In this post I will describe briefly the basic functions that are documented on the MSDN and which enables you to work with Modal Dialogs. In a second part I will explain the usage of internal JavaScript functions that are not supposed to be called by custom code. You must be aware that these functions are not documented, ultimately your code should not use these functions because future updates could break down your custom features. But sometimes you need to go beyond the provided API when you have

Opening a Modal Dialog

Let’s begin with the easier and most useful part : opening a new Modal Dialog. For testing purpose I advise you to create an ASPX page inheriting from the default Master Page on a blank Team Site. Then you can add this code directly in a script block in the Main ContentPlaceHolder:

 I won’t go further in details about the different options available because you can now see the whole list on MSDN :

Leave a Reply

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