开发者

opening 2nd dialog from another form on top of first one in jquery

开发者 https://www.devze.com 2023-02-16 19:20 出处:网络
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

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.

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 expiri开发者_如何学JAVAng 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.

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?


Have you tried:

$(selector).dialog("moveToTop");


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');

then $('#sessionEndDialog').dialog('open') again when I want to pop it up.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消