从jQuery中第一个窗体顶部的另一个窗体打开第二个对话框 [英] opening 2nd dialog from another form on top of first one in jquery

查看:95
本文介绍了从jQuery中第一个窗体顶部的另一个窗体打开第二个对话框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我要感谢tvanfosson在这里的贡献(在ASP.net MVC中的会话结束)这件事很好用,但不幸的是,如果会话过期对话框不是当前选项卡/窗口中唯一的一个对话框,则在我的实现中有点混乱.

First of all I want to thank tvanfosson for his contribution here (Session End in ASP.net MVC) This thing works great but unfortunately on my implementation it kinda messes up if the session expiring dialog is not the only one dialog on the current tab/window.

我猜想这可能是因为已经打开了其他对话框,这就是为什么其他表单(主页)无法打开到期对话框的原因,但是当我使其他对话框成为非模态对话框时它仍然不显示.我正在将IE 8与jQuery 1.4.2 min,1.8.2 UI和1.2.0布局库一起使用.

I was guessing that may be because there are other dialogs already opened that's why another form (the main page) can't open the expiring dialog, but it still doesn't show up when I made the other dialogs non-modal. I am using IE 8 with jQuery 1.4.2 min , 1.8.2 UI, and 1.2.0 layout libs.

我有一个主页也可以打开其他对话框/小窗口,因此,如果会话在打开其中的任何一个窗口时过期,则不会显示过期对话框,并且IE 8在顶部弹出警告消息,提示兼容性视图".有没有一种方法可以告诉jQuery,无论弹出的对话框是什么级别,都允许它显示出来?

I have a main page which opens other dialogs / small windows too, so if the session expires while any of them are opened then the expiring dialog don't show up, and IE 8 pops a warning message at the top telling "compatibility view". Is there a way to tell jQuery to allow the expiring dialog to show up no matter what or at what level it pops up?

推荐答案

好吧,终于可以通过作弊工作了,尽管我还是不喜欢.准备好文档后,如果我打开和关闭对话框,则该对话框适用于所有情况

Well, finally it's working by means of a cheating which I still don't like though. On my doc ready if I open and close the dialog then it works for all scenarios

$('#sessionEndDialog').dialog('open');
$('#sessionEndDialog').dialog('close');

然后再次弹出$('#sessionEndDialog').dialog('open').

moveToTop在且仅当sessionEndDialog以前打开过一次但在现有对话框顶部第一次打开时才起作用,这是没有用的.

moveToTop was working if and only if the sessionEndDialog was opened once before but while it was opening for the first time on top of an existing dialog it wasn't working.

这篇关于从jQuery中第一个窗体顶部的另一个窗体打开第二个对话框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆