ajax更新后将焦点设置为确认消息
我有一个列表页面(有数据网格)。我确实在每行中都有编辑按钮,单击该按钮会打开叠加层(ajax 模式弹出窗口)。插入/更新数据后,我必须刷新数据网格以显示新插入的数据,并在页面顶部显示消息,说明数据已成功插入/更新。
由于我在页面周围有更新面板,页面的焦点集中在我单击编辑按钮的行上,因此用户实际上必须一直向上滚动才能看到成功的消息。有什么办法可以在ajax更新后将焦点/滚动一直向上设置,以便用户可以看到记录是否更新成功。
注意:我在关闭模式弹出窗口后调用 updatepanel.update() 方法来刷新更新面板。
任何帮助将不胜感激。
I have a listing page(that has datagrid). I do have edit button in each row clicking that opens up overlay (ajax modal popup). After inserting/updating data, I have to refresh data grid to display newly inserted data and displays message on the top of page saying Data is inserted/updated successfully.
Since I have update panel around the page, page has a focus on the row where I click edit button so users actually have to scroll all the way up to see successful message. Is there any way I can set focus/scroll all the way up after ajax update so user can see whether the record is updated successfully or not.
Note: I am calling updatepanel.update() method to refresh update panel after closing modal popup.
Any help will be appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好的旧命名锚标签会对您有帮助吗?
例如
上面只是伪代码。我想说的是,你可以通过URL中的#符号跳转到锚点
Would the good old named anchor tag help you?
e.g.
The above is just pseudo-code. What I want to say, is that you can jump to the anchor with the #-notation in the URL