Click to See Complete Forum and Search --> : Simple "Loading..." applet?


Joseph Mama
04-07-2003, 05:03 AM
Can anyone provide any insight?

I'm trying to create a simple little applet that is going to be run in the <Head> section (i.e., before the rest of the <Body> code is interpeted).

I'd like the applet to pretty much run...spit out a message that says "Loading..." that sits for maybe two-three seconds (maybe adds the ". . ." during that time) and then just goes away completely.

Simple?

Thanks!

gil davis
04-07-2003, 05:43 AM
Applets are Java, not JavaScript. You have posted in the wrong forum if you need an applet.

However, if you really want JavaScript (or don't know enough to care either way), see:

http://javascript.internet.com/page-details/preload-page.html

viravan
04-07-2003, 08:07 AM
If you know how to create an applet, creating a splash screen is simple. Start here:

http://developer.java.sun.com/developer/qow/archive/24/index.html


:)

V.V.

Joseph Mama
04-07-2003, 03:33 PM
Thanks for your replies.

Yes, I actually should have said "script" instead of "applet"...I was thinking of a little application that would run once and then go away...and for some reason "applet" stuck in my head. Nevertheless, I am going to take a look at the Java solution too.

I tried using the Javascript script a while back, but for some reason, when I used it, the "Page Loading...Please Wait" message never went away. Actually, it's not just the script, I tried following a turtorial and the same thing happened.

This time (I just tried again), only the Javascript elements of my page loaded (and the message remained). The <script> backets are closed and everything is pasted correctly.

Anyhow, I figured that since this script is supposed to wait until everything is loaded before having the text wiped, maybe something in my page just wasn't finishing. For example, I have a Javascript stock ticker that just keeps cycling.

So, I decided that maybe I could use a script that just runs once and ends (and disappears) independently of everything else loading...

I'm not sure if I diagnosed my problem correctly (please correct me if I am wrong)...but in case I am accurate, then any insight as to how I can code the simple "run once then disappear" script?

Thanks!

gil davis
04-07-2003, 06:30 PM
It would be more constructive if you would post a link or attach a text file with your code in it.