Please Wait...Java Applet Loading
By Carl Dreher
Large, Web-deployed Java applications can take a long time to download. I experienced this recently when I developed a business-management program that contained over 140 class files, most of which had to download before it ran. This can take anywhere from ten seconds to several minutes depending on the connection speed and the user's modem. To prevent the user from thinking the browser has crashed during a long download, the program displays an animated clock and a "Please Wait" message, which are removed after the download. Here's how I did it.
Two Solutions
There are two ways to solve this problem. The first is dead easy and requires only a minimal knowledge of HTML and JavaScript. Unfortunately, it only works for Netscape Navigator and Internet Explorer 4. It will not run on Explorer 3. Since I have many clients who have sampled Explorer 4 and returned to Explorer 3 after endless frustration, this is a major disadvantage.
The second solution works on Navigator 3-4 and Explorer 3-4, but, of course, it's more complicated. I'll describe both solutions and you can chose the one that applies to your situation. Be forewarned, though! If you're developing a Web site for general use, whatever you write should at least run on Netscape 3 and Explorer 3. There are millions of users who, for very good reasons, have not upgraded to the latest and greatest browser version.
The Easy Solution
The easy solution is based on the JavaScript image object, a convention developed by Netscape and adopted by Microsoft only in version 4 of its browser.