Hello,
I am finishing up creating a fairly complex page that is very rich in
DHTML. In addition to updating it self every couple of seconds,
various components on it support sync and async communication with
various web services.
The problem is that if a user tries to click on any JS driven content
before the page is fully loaded, it will not work properly since it
relies on many onLoad scripts that initiate webservices etc.
is there a clean way, to simply disable any page functionality before
it loads ?
other than explicitly enabling every control in window.onload() event.
TIA
-s 5 6275
On 5 Nov 2004 09:28:35 -0800, sq**********@ho tmail.com (sonic_soul)
wrote: other than explicitly enabling every control in window.onload() event.
Yes, this is much more sensible approach, don't give them anything to
click on until you're ready to handle it.
It's not difficult.
Do not use SYNC in webpages though, with JS sharing the UI thread, the
lockups you get are nasty.
Jim.
sonic_soul wrote: Hello, I am finishing up creating a fairly complex page that is very rich in DHTML. In addition to updating it self every couple of seconds, various components on it support sync and async communication with various web services.
The problem is that if a user tries to click on any JS driven content before the page is fully loaded, it will not work properly since it relies on many onLoad scripts that initiate webservices etc.
is there a clean way, to simply disable any page functionality before it loads ?
other than explicitly enabling every control in window.onload() event.
Set a global enabling boolean in window.onload() and have your functions
test it:
<script type="text/javascript">
window.onload = function() { window.isLoaded = true; }
function foo(bar) {
if (window.isLoade d) {
// do your stuff
} else {
alert('The page has no finished loading yet!');
}
}
</script>
--
Grant Wagner <gw*****@agrico reunited.com>
comp.lang.javas cript FAQ - http://jibbering.com/faq
On Fri, 05 Nov 2004 18:00:00 GMT, Grant Wagner
<gw*****@agrico reunited.com> wrote: sonic_soul wrote: other than explicitly enabling every control in window.onload() event.
Set a global enabling boolean in window.onload() and have your functions test it:
The problem with this though, is that the user can still attempt all
the actions and just get confused by nothing happening..
Jim.
Perhaps load the page as the last thing possible. Load the code and ui
into a frame, and the page into another frame. But the last load event
will be to change the navigation frame from a "wait while loading"
document to the document you want.
Jim Ley wrote: On Fri, 05 Nov 2004 18:00:00 GMT, Grant Wagner <gw*****@agrico reunited.com> wrote:
sonic_soul wrote:
other than explicitly enabling every control in window.onload() event.
Set a global enabling boolean in window.onload() and have your functions test it:
The problem with this though, is that the user can still attempt all the actions and just get confused by nothing happening..
1. put a big banner at the top saying "Please wait for page to load"
2. if any user event is fired whilst window.loaded = false; put up an
alert to say wait
3. In the onload(), hide the banner (display: none) and set
window.loaded = true;
Cheers, Fred. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: viator |
last post by:
Hello everybody. I am a student doing my masters in Comp. Sci. Will
some explain to me why it seems completely two worlds when taking
about DHTML in NN and IE. Is there any way to write truly portable
webpages using DHTML ofcourse.
|
by: Matt Kruse |
last post by:
I've just put up a new script on my site:
http://www.mattkruse.com/javascript/mktree/
This script combines javascript and some tricky CSS to create the
easiest-to-implement expandable/collapsable tree I've seen anywhere.
Just define your tree structure in an <UL> list, set its CSS class,
include the .js source file, and that's it! Newer browsers will see it
as a fully-functional tree, and older browsers will see the plain
unordered...
|
by: Ralph Freshour |
last post by:
How can I disable a button once it has been clicked? I want to prevent
the user from clicking on it twice if they have a slow connection.
Thanks...
|
by: Dafydd |
last post by:
I have the following Script in my web page reduce to two pages.
<script>
function details()
{
document.getElementById('details').style.visibility='visible';
document.getElementById('capabilities').style.visibility='hidden';
}
function capabilities()
{
|
by: Fenno |
last post by:
I have an ASP.NET web application that contains some pictures that
sometimes take several seconds to load. These pictures are contained in
user controls on the page (if that makes any difference).
The problem is that whilst the page is still loading, it is impossible
to click on any of the links/buttons on the page. If you do click on a
link/button, nothing happens. The site in question is
http://www.shopandcrop.com.au However, once the...
| |
by: Nalaka |
last post by:
Hi,
I suddenly started getting a lot of errors from html validation (some CSS)
so I followed the following instructions to disable it.
If you'd rather not have these types of HTML validation errors show up in
your error-list, you can disable this functionality by selecting the
Tools->Options menu item in VS or Visual Web Developer. Select the
TextEditor->Html->Validation tree option in the left-hand side of the
|
by: Chris |
last post by:
Can anyone recomend the best way of disabling a button a page until it is
fully loaded? Would it need to be done with Javacript?
|
by: ChrisN |
last post by:
Invoking a postback before a large ASP.NET page has fully rendered
will often cause the page to crash. This is unhelpful and confusing
to users.
I'm wondering if I can overcome this by disabling any controls that
invoke a postback until the page is fully rendered, ie setting the
controls disabled server-side, serving the page and then having a
JavaScript routine right at the bottom of the page re-enable them
client-side.
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
| |
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |