Click to See Complete Forum and Search --> : page loading, please wait graphic
geuis
04-12-2003, 10:09 PM
I have a page that, when loaded, automatically logs into another page. I have a static message that basically says "Please wait..." right now. I would like to make it so that the "..." increment one at a time, so the user sees
"Please wait." then "Please wait.." then "Please wait..." then "Please wait." then "Please wait.." etc.
I've looked for some code dealing with text displays but I haven't really found anything that looks like it would do this. Any help is really appreciated.
viravan
04-12-2003, 10:24 PM
Have you tried to google for progressbar....this is rather easy to do with a Java applet (for an example, see link shown below):
http://www.objectplanet.com/ProgressBar/
:)
V.V.
Nevermore
04-13-2003, 07:15 AM
This should do it:
Place this code in the head:
<script language="Javascript" type="text/javascript">
<!--
//Code copyright of Jacob Ward (Cijori). Created 2003. This code may be used free
//of charge as long as this notice remains intact but MAY NOT be distributed
//without my express permission. Permission is granted to all none-profit organisations.
x=0;
window.setTimeout("wait()",1);
function wait() {
x++;
window.setTimeout("more()",500);
var newwait = new String(document.getElementById("wait").firstChild.nodeValue + ".");
if (x<=3) {document.getElementById("wait").firstChild.nodeValue=newwait;}
else {x=0; document.getElementById("wait").firstChild.nodeValue="Please Wait";}
}
function more() {window.setTimeout("wait()",500);}
//-->
</script>
and this in the body:
<a id="wait">Please Wait</a>
Vladdy
04-13-2003, 07:36 AM
If your page needs a "Please Wait..." message you need to reconsider your design. Majority of visitors will simply hit "Back" button when they see "Please Wait... ", "Page Loading... ", progress bar or any other indication that they are not getting the content they are after promptly.
Nevermore
04-13-2003, 08:27 AM
It's better than showing nothing at all for a time. That will convince most visitors that your site isn't finished.
Vladdy
04-13-2003, 09:45 AM
Good design will keep the size of a page about 20-40K so that it loads within a few seconds even on dial-up. This is most important for the home page. Having some "please wait" message does not solve the design problem.
Nevermore
04-13-2003, 10:46 AM
Most pages that I make will be much less than that - 40k is really far to big. the recommended size is 12k. However, if you have a page that displays a large picture, a please wait message while it preloads may be preferable. Also if an applet has to load. It isn't perfect, but it is sometimes better.
Not everything can be condensed down into a small file. Incidentally, 40k is a long wait on a dial up. Probably more than a few seconds.