Using SharePoint 2010 dialogs
转: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 by
SP.UI.Dialog and SP.UI.ModalDialog classes.The dialog code is included in
C:\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 the
SP.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
		
转:http://kyleschaeffer.com/sharepoint/sharepoint-2010-pop-up-dialogs/ SharePoint 2010 makes it incre ...
 - SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框
		
SharePoint 2010 Pop-Up Dialogs SharePoint 2010 弹出对话框 SharePoint 2010 使得往你的站点加入对话框内容变得出乎意料的简单 ...
 - 在SharePoint 2010中,如何找回丢失的服务账号(Service Account)密码
		
背景信息: 通常在SharePoint环境中我们会使用很多的服务账号来运行各种不同的服务,尤其在企业环境中,由于权限管理条例严格,这些服务账号更是只能多不能少.面对如此多的服务账号,各个企业都会有自己 ...
 - 安装InfoPath 2013后 SharePoint 2010 出现 “找不到 Microsoft.Office.InfoPath, Version=14.0.0....” 的错误的解决方案
		
1. 症状 您的SharePoint 2010的服务器是不是最近一直出现这个错误呢? Could not load file or assembly 'Microsoft.Office.InfoPat ...
 - Upgrade from SharePoint 2010 to SharePoint 2016
		
[转]http://nikcharlebois.com/upgrade-from-sharepoint-2010-to-sharepoint-2016/ In this blog, I will go ...
 - [SharePoint 2010] 自定义字段类型开发(二)
		
在SharePoint 2010中实现View Action Button效果. http://www.sharepointblogs.be/blogs/vandest/archive/2008/06 ...
 - SharePoint 2010 + 左侧导航(Left Nav Bar)二级菜单的修改
		
SharePoint 2010 + 修改左侧导航类似顶部导航菜单的样式 查找aspmenu的控件,ID为“V4QuickLaunchMenu”,修改分别将属性“StaticDisplayLevels” ...
 - 关于SharePoint 2010中不能使用AjaxControlToolkit的解决办法
		
因为项目中有一个需求需要使用calendar控件,而且样式要和Reporting Service中的尽量一致,搜索了很久发现还是微软的AjaxControlToolkit提供的CalendarExte ...
 - SharePoint 2010商业智能组件
		
Microsoft Office SharePoint Server (MOSS) 2007中,就已经提供了很多支持商业智能的能力.其中主要的组件包含Excel Services, Reporting ...
 
随机推荐
- linux标准输入输出重定向
			
command > filename 把标准输出重定向到一个文件,如果文件不存在则新建,如果存在则覆盖其内容.command >> filename 把标准输出重定向到一个文件中,如 ...
 - VC++创建、调用dll的方法步骤
			
文章来源:http://www.cnblogs.com/houkai/archive/2013/06/05/3119513.html 代码复用是提高软件开发效率的重要途径.一般而言,只要某部分代码具有 ...
 - 1588: [HNOI2002]营业额统计 - BZOJ
			
Description营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况. Tiger拿出了公司的账本,账本上记录了公司成立以来每天 ...
 - PAT-乙级-1026. 程序运行时间(15)
			
1026. 程序运行时间(15) 时间限制 200 ms 内存限制 65536 kB 代码长度限制 8000 B 判题程序 Standard 作者 CHEN, Yue 要获得一个C语言程序的运行时间, ...
 - JavaScript 踩坑心得— 为了高速(下)
			
一.前言 本文的上一篇 JavaScript 踩坑心得- 为了高速(上) 主要和大家分享的是 JavaScript 使用过程中的基本原则以及编写过程中的心得分享,本文主要和大家聊聊在各个使用场景下的 ...
 - Side by Side Assembly介绍--manifest文件的使用
			
什么是Side-by-Side Assembly? Side-by-Side Assembly(建称SxS)是微软在Visual Studio 2005(Windows 2000?)中引入的技术,用来 ...
 - UR #13 Ernd
			
考试的时候没有注意到可以将(a,b)放在二维平面上之后旋转坐标系,使得转移变成树状数组二维偏序 这样就算我想出来了第二个转移的斜率优化也没有什么卵用啊(摔西瓜 设g(i)表示当前站在第i个水果下面且第 ...
 - perl杂项
			
perl -pi -e 's|googleapis.com|useso.com|g' `find ./ -type f` yingc@yingc:~/gcyin/test/thirdparty/ffm ...
 - Protected Functions 是理解OO的难点和关键
			
Protected Functions 是理解OO的难点和关键 private和public函数都好理解,这里就不多说了,夹在中间的prortected却有许多精妙之处,说说我的几个疑问和看法:1. ...
 - Cygwin安装时,选择163的源后出错:Unable to get setup.ini from <http://mirrors.163.com/cygwin/>
			
[问题] 折腾: [记录]Cygwin下把make从v3.82换成v3.81 期间,选择了163的源,结果出错: Cygwin Setup Unable to get setup.ini from & ...