jqModal打开链接后,在链接的页面里关闭这个jqModal的方法
protected void btnClose_Click(object sender, EventArgs e)
{
try
{
string scr = string.Format(@"<script>window.parent.theForm.jqmClose.click()</script>");
string csname1 = "SelOrderDetail";
Type cstype = this.GetType();
// Get a ClientScriptManager reference from the Page class.
ClientScriptManager cs = Page.ClientScript;
// Check to see if the startup script is already registered.
if (!cs.IsStartupScriptRegistered(cstype, csname1))
{
cs.RegisterStartupScript(cstype, csname1, scr);
}
}
catch (BizException bizEx)
{
WebUtil.ShowMsg(this.Page, bizEx.Message);
}
catch (Exception ex)
{
WebUtil.ShowMsg(this.Page, ex.Message);
Logger.Write(ex);
}
}
重点是这句:
<script>window.parent.theForm.jqmClose.click()</script>
- window.parent. 在当前页面获得父页面;
- theForm. 在父页面里获得Form表单;
- jqmClose. 在Form表单里获得jqModal的关闭按钮jqmClose(这里的jqmClose是关闭按钮的id,不是class名);
- click() 模拟获得的关闭按钮的单击事件
这样就ok啦!
分享到:
相关推荐
jqModal - jQuery模式窗口插件 。
jqModal 插件的js和css样式文件;配合博客文章:http://blog.csdn.net/yangkai_hudong/article/details/46051149使用
jqModal所需要的CSS源码,这是一个非常强大有助的源码,希望大家喜欢。
轻量级的弹出窗口jQuery插件,压缩后仅仅3.65Kb,基于jQuery1.4.2开发,主要实现弹出框的效果,并且加入了很多有趣的功能,比如callback函数,显示隐藏层,Ajax页面,iframe嵌入页面……
jqModal是我认为最强大方便的一个jquery弹窗插件
前端项目-jqModal,jqmodal帮助您显示模态、弹出窗口和通知。它是灵活和微小的,并提供了一个通用的基础,为您的所有窗口需要。
jquery jqmodal demo 示例 例子 包含了官居网站所能运行例子的源码 本文非原创..压缩包中已注明出处.. 5分共享.望各位理解.. 里边已经带了样式图片..直接运行即可..具体开发自行参照
jQuery+jqmodal弹出窗口的制作方法,需要的朋友可以参考下。
全是网上找的 现在集中起来给大家 里面的内容有: JQweebox jqmodal firstebox ThickBox+3_1
一,为什么不要用for in语句 jqModal这个jquery插件估计很多人都使用过,在jqModal源码内部,有一个函数为hs,其中有个嵌套循环如下, 代码如下: for(var i in {jqmShow:1,jqmHide:1}) for(var s in this[i]) if(H...
用过了jqmodal后,发现应用起来不是很自如,就自己写了个。要用到jquery,大家如果急用,就将就着用吧……有时间了,我看看能不能加个托动功能……
利用jqModal控件进行弹出框效果,如忘记密码点击出现弹出框输入邮箱进行找回效果弹出框效果蛮不错的控件
一个基于flexigrid+struts2+json+jquery开发的实例,并拓展了一些功能: 1.添加了右键事件(查删改),jqmodal 2.实现了列百分比的显示 3.优化了查询界面
| jqModal js | jquery fmatter js | jquery jqGrid js | JsonXml js">css | ellipsis xbl xml | ui jqgrid css js | i18n | grid locale en js | grid locale cn js | grid locale js | Changes txt | install txt ...