Using SharePoint 2010 dialogs
来源:互联网 发布:淘宝v2贷款 编辑:程序博客网 时间:2024/05/16 06:19
转:http://www.techbubbles.com/sharepoint/using-sharepoint-2010-dialogs/
SharePoint 2010 dialogs are JavaScript pop-up dialogs consisting of an iframe to request the other pages in the SharePoint. These pages can be publishing pages or application pages.When you call a pop-up dialog in SharePoint 2010, the content is displayed by using the system master page. The dialog functionality in SharePoint exposed bySP.UI.Dialog and SP.UI.ModalDialog classes.The dialog code is included inC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS\SP.UI.Dialog.js file in SharePoint server.
In order to get intellisense support for dialog functions inside VisualStudio you have to refer SP.UI.Dialog.js file. You can use theSP.UI.ModalDialog.showModalDialog method to create a new dialog. This method takes in an options parameter which gives the details for what the dialog will display, such as the Uniform Resource Locator (URL) and the Heading for the dialog boxes. The following code can be used to call a modal dialog window.
function OpenModalDialog(url, heading) { var options = SP.UI.$create_DialogOptions(); options.url = url; options.heading = heading; SP.UI.ModalDialog.showModalDialog(options); }
You can call the function as below
<a href="javascript:OpenModalDialog('/SitePages/Dialogs/DefaultView.aspx?SpeakingID=52', 'SharePoint Modal dialog Demo ');"> Open Window</a>
If you do not want to pass parameters in for URL and heading then you can wrap the function as shown below
function OpenWebPage() { var options = { url: "/SitePages/Dialogs/DefaultView.aspx", width: 800, height: 600, }; SP.UI.ModalDialog.showModalDialog(options); }
<a href="javascript:OpenWebPage();">Open Dialog </a>
You can create an application page and then can open in dialog window, Create an empty SharePoint project in Visual Studio.
Add a new item to the project and select Application page from the dialog
Visual Studio application will automatically add a mapped folder for the %SPROOT%/Template/Layouts folder and will add the new application page in a folder named after your project.In SharePoint 2010, all system generated dialogs are based on the dialog.master master page that can be found at %SPROOT%/Template/Layouts/Dialog.master.
- Using SharePoint 2010 dialogs
- SharePoint 2010 Pop-Up Dialogs
- SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框
- Dialogs API: Using Dialogs API
- SharePoint 2013 Pop-Up Dialogs
- SharePoint 2013 Pop-Up Dialogs
- Using Linq in Sharepoint 2010
- 3-5 使用对话框(Using Dialogs)
- (转)3.5 使用对话框(Using Dialogs)
- Using the SharePoint 2010 Client Object Model_part_1
- Using the SharePoint 2010 Client Object Model_part_2
- Using the SharePoint 2010 Client Object Model_part_3
- Using the SharePoint 2010 Client Object Model_part_4
- Using the SharePoint 2010 Client Object Model_part_5
- Using the SharePoint 2010 Client Object Model_Part_6
- Using the SharePoint 2010 Client Object Model_part_1
- Using the SharePoint 2010 Client Object Model_part_2
- Using the SharePoint 2010 Client Object Model_part_3
- 免费的21个UI界面设计工具、资源及网站
- 科大讯飞发布四川话语音识别技术,号称识别准确率超过85%
- NoobyProtect 1.0.0.5 RSS
- Flex的模块加载图表控件出现Error #1009解决之道
- Java文本文件解析实例(File + Scanner)
- Using SharePoint 2010 dialogs
- BUPT OJ83 A+B
- 苹果推出iBeacon规范 向无限可能又迈进一步
- bash中Vim命令的使用
- linux 中rpm与yum
- F5负载均衡器的维护
- poj 2352 Stars(简单树状数组)此题也可以用线段树来做
- 更改myeclipse 背景颜色
- 对SVM的个人理解