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下Mysql数据库备份
今天一同事的电脑无缘无故坏了,找了IT部门检测说是硬盘坏了,数据无法恢复.好悲剧.自己博客也写了好久不容易,要是突然间数据丢了那怎么办!于是写了个数据库自动备份脚本,并创建任务计划,实现每天22:30 ...
- sybase convert 函数
1.从string到int的转换 convert(int,@string) select convert( int , '15') 2. 从int 到 decimal 的转换 convert(deci ...
- springmvc整合redis架构搭建实例
新换环境,又有新东西可以学习了,哈皮! 抽空学习之余看了一下redis,个人对Springmvc的爱是忠贞不渝,所以整理了一下Springmvc整合redis的环境搭建.分享学习. 第一步: 创建ma ...
- DirectX考试判卷心得
今天帮老师判<三维图形程序设计>的试卷,这门课开卷考,用的教材是段菲翻译的DX9的龙书.判卷过程中发现有两道题虽然不难,但是错的比较多: 1.Direct3D中深度缓冲区中值的范围? A. ...
- Microsoft .NET Framework 4.0安装时发生严重错误 无法安装
前几天安装Axure,电脑提示没有安装.NET Framework4.0,然后下载安装,又提示如下图所示情况: 在网上找了好多方法,大多都是打开cmd,输入net stop WuAuServ,修改注册 ...
- ./configure详解
'configure'脚本有大量的命令行选项.对不同的软件包来说,这些选项可能会有变化,但是许多基本的选项是不会改变的.带上'--help'选项执行'configure'脚本可以看到可用的所有选项.尽 ...
- VB逆向
大家或许有所察觉了,随着我们课程的不断深入学习,我们感觉自身逆向的“内功”也在不断的增进! 我们从爆破入手,到现在逐步大家进入程序的内部,认识不同编译器开发的程序,探索不同的加密逻辑. 前边,我们的例 ...
- Unity3D开发之NGUI结合粒子系统的遮挡问题
原地址:http://blog.csdn.net/lihandsome/article/details/22194025 我的是NGUI3.0.3版本,在加入粒子系统的时候发现一直都是在精灵的下面,所 ...
- ECNU1104-BFS
简单的BFS题意:多起点多终点 /* 简单的BFS 题意:多起点多终点 */ #include<stdio.h> #include<string.h> #include< ...
- linux ln命令 创建链接(快捷方式)
命令格式: ln -s 目标地址 链接名称 # 假设/home目录下有wuyou文件夹,你要在当前目录创建一个链接指向它 $ ln -s /home/wuyou wuyou_link