View Full Version : Loading bar

08-10-2004, 08:26 PM
I want a bar that will show a teal (00FFFF) loading bar that counts to 10, while displays a loading status in the status bar. I would like it to redirect the user to go from my splash to mainpage. Is this possible? Thanks. :thumbsup:

08-10-2004, 09:57 PM
The loading bar part is not hard to make, but there's a couple of questions I have:

do you want this on your splash page or on a page on its own?
do you want it to actually be loading the page in the background?

Here's the code for the loading bar, with no document loading happening in the background:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">


<table cellspacing="0" cellpadding="0">
<td id="td_loading_1">&nbsp;</td>
<td id="td_loading_2">&nbsp;</td>
<td id="td_loading_3">&nbsp;</td>
<td id="td_loading_4">&nbsp;</td>
<td id="td_loading_5">&nbsp;</td>
<td id="td_loading_6">&nbsp;</td>
<td id="td_loading_7">&nbsp;</td>
<td id="td_loading_8">&nbsp;</td>
<td id="td_loading_9">&nbsp;</td>
<td id="td_loading_10">&nbsp;</td>
<td id="td_loading_display" colspan="10" align="center">&nbsp;</td>

var loading_counter = 1;
function increment_loading_bar() {
if(loading_counter > 10) //stop the 'recursion'

var td_loading = document.getElementById('td_loading_'+loading_counter);
td_loading.style.backgroundColor = '#00FFFF';

var td_display = document.getElementById('td_loading_display');
var new_display = document.createTextNode(loading_counter);
td_display.replaceChild(new_display, td_display.lastChild);

setTimeout('increment_loading_bar();', 1000);



08-11-2004, 02:33 AM
1. No
2. Yes.
Splash page is here ("http://www.geocities.com/iceywarriors/splash.html) and the website is here (http://www.geocities.com/iceywarriors/index.html)

08-11-2004, 10:43 AM
I want

didn't realise these forums were for people to get others to code for them. thought we were all here to help one another sort coding problems, not to demand scripts from the rest.

so, instead of saying "i want", surely you mean you'd like someone help YOU put together a script that would do what you want.