受控的超链接劫持

发布于 2024-09-03 07:47:51 字数 296 浏览 4 评论 0原文

我正在开发一个网络应用程序。

我有一个带有“命令”列的数据网格,其中包含一些常见 CRUD 操作(编辑、删除等)的超链接。

当用户单击“编辑”超链接时,我会检索数据网格行的唯一标识符并加载模式表单对话框(我使用的是 jQuery UI),以便用户能够编辑行数据并随后关闭模式表单对话框此时我刷新页面。

现在,在页面刷新之前,用户有可能再次单击编辑链接,无论何时发生这种情况,“hijaking”都会失败。

我的问题是我如何检查如果用户单击超链接并且页面正在刷新,我会延迟直到刷新完成,然后我允许“hijax”启动。

I am working on a web application.

I have a data grid with a 'commands' column that has hyperlinks for some common CRUD operations (Edit, Delete, etc).

When a user clicks on say the Edit hyperlink, I retrieve the unique identifier for the data grid row and load a modal form dialog (i am using jQuery UI) so the user is able to edit the row data and subsequently close the modal form dialog at which point I refresh the page.

Now, before the page is done refreshing, there's a chance that a user might click on the edit link again, and whenever that happens, 'hijaxing' fails.

My question is how can i check that if a user clicks on a hyperlink and the page is refreshing, i delay until it is done refreshing, then i allow the 'hijax' to kick in.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

情归归情 2024-09-10 07:47:51

不关闭对话框,而是让页面刷新丢弃它怎么样?

How about not closing the dialog, but letting the page refresh discard it?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文