带有父/子窗口的 ASP.NET Web 应用程序父超时,无法识别子窗口中的使用
我编写了一个 Jquery 函数,它会在一定时间不活动后关闭屏幕,创建一个弹出窗口,允许用户单击按钮以保持登录状态,然后将其注销(关闭应用程序窗口)如果他们没有及时回应。
从技术上讲,我们不使用母版页,但我们确实有一个父页面,其中包含页眉、页脚和导航,并且从该窗口调用我的 Jquery 代码。
我的问题是,如果在子窗口中工作,则父窗口无法识别系统正在使用,并且会在分配的时间自动参与。
我知道它不存在,但我想我正在寻找 window.child.settimeout 或类似的东西。预先感谢您的时间和任何想法。
I've got a Jquery function that I wrote which blacks out the screen after a certain amount of inactivity, creates a pop-up that allows the user to click a button to stay logged in, and logs them out (closing the application window) if they do not respond in time.
We don't technically use master pages, but we do have a parent page in which our header, footer and nav reside, and my Jquery code is called from that window.
My problem is that if one is working in a child window, the parent window doesn't recognize that the system is in use, and will automatically engage at the allocated time.
I know it doesn't exist, but I guess I'm looking for a window.child.settimeout or something like that. Thanks in advance for your time and any ideas.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需让您的子窗口向父窗口报告其活动即可。
在父窗口中,添加一个函数:
然后在子窗口中,调用该函数:
每当检测到用户的活动时。
Simply have your child window report it's activity to the parent window.
In the parent window, add a function:
And then in the child window, call that function:
whenever you detect user's activity.