禁用浏览器的按钮,直到页面加载完成 [英] Disable browser button until page finish loading

查看:107
本文介绍了禁用浏览器的按钮,直到页面加载完成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个顶点应用程序,但因为表单页面有这么多的数据,从单个记录呈现,有时,如果你没有耐心等待额外的2-6秒,有时你点击浏览器的后退按钮按钮在应用程序中,如果你点击其中任何一个。你会从应用程序得到一个错误。

I have an apex application but because the form page has so much data to render from individual record and sometimes if you don't have the patient to wait for that extra 2-6 seconds you sometimes click on the browser back button a button in the application and if you click on either of them. you will get an error from the application.

顶点确实支持jQuery的,如果你不知道。

Apex does support jquery, if you didn't know.

我想添加一个Javascript其禁用任何按钮,包括浏览器的按钮,直到我的应用程序完成加载的页面。

I wanted to add a Javascript which disable any buttons including the browser buttons until a page in my application finish loading.

我做了谷歌搜索一些和他们没有展现出像样的解决方案。

I did some search on google and none of them show a decent solution.

我尝试任何事情,因为我不知道该怎么做。我已经非常有限的jQuery知识。

I have try anything yet because I have no idea how to do it. I have very limited knowledge of Jquery.

您帮助很多将意味着

感谢

推荐答案

理想的方法是为了显示prevents用户点击从屏幕上的任何屏幕上的一个模式弹出对话框。

The ideal method is to display a modal popup dialog on the screen that prevents user from clicking anything on the screen.

jQuery UI的模态对话框演示: http://jqueryui.com/resources/demos/对话框/ modal.html

jQuery UI Modal Dialog demo: http://jqueryui.com/resources/demos/dialog/modal.html

而在这模式,显示类似加载网页,请稍候。

And in that modal, show something like, "Loading page. Please wait."

和不,你不能禁用浏览器的按钮。它是一种禁忌。

And no, you cannot disable browser buttons. Its a no-no.

这篇关于禁用浏览器的按钮,直到页面加载完成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆