jQuery UI 对话框将用户从另一个浏览器选项卡中拉出
我在基于会话超时的计时器上设置了 jQuery UI 对话框。
该对话框会在实际会话超时前两分钟弹出,并在对话框中为用户提供一分钟倒计时。当倒计时结束时,它会关闭对话框并重定向到注销 URL。
这实际上会在会话超时前一分钟将用户注销,但它给了我一些时间来运行其他几个部分来保存他们已经输入的数据。
问题是,在 IE 和 Safari(PC 和 Mac)中,当对话框弹出时,用户会被拉回到我的系统所在的浏览器选项卡。如果他们打开了另一个选项卡来搜索谷歌或我想要弹出对话框的内容,请运行倒计时并重定向到注销,而无需将它们从其他浏览器选项卡中拉出。不显示在他们当前的选项卡上 - 只是显示在后台,以防他们碰巧回到我的系统。
关于如何实现这一目标有什么想法吗?
谢谢
I've got a jQuery UI dialog setup on a timer based on the session timeout.
The dialog pops two minutes before the actual session times out and gives the user a one-minute countdown in the dialog. When the countdown runs out, it closes the dialog and redirects to the logout URL.
This actually logs the user out one minute before session timeout, but it gives me some time to run a couple of other pieces to save the data they already entered.
The issue is that in IE and Safari (both PC and Mac), the user is pulled back to the browser tab that my system is on when the dialog pops. If they have opened another tab to search google or something I'd like for the dialog to pop, run the count down and redirect to the logout without pulling them from their other browser tab. Not show over their current tab - just show in the background in case they happen to come back to my system.
Any thoughts on how to accomplish this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我不确定您的具体情况,但请尝试以下操作:
堆栈选项 指定对话框是否堆叠在其他对话框之上。这将导致该对话框在获得焦点时移动到其他对话框的前面。
试一试。
I'm not sure your exact situation but try something like the following:
The stack option specifies whether the dialog will stack on top of other dialogs. This will cause the dialog to move to the front of other dialogs when it gains focus.
Give it a shot.
最终只是放弃了从另一个站点借用的全新设置超时和重定向脚本。这个有链接而不是使用 jquery 对话框。
ended up just dropping in a whole new set up timeout and redirect script borrowed from another site. this one has links instead of using jquery dialog.