javascript problem (update html id)?

Sarit

New member
Hi,
i spend hours trying to understand why that simple code does not work!.
Please help!
it goes like that:

<p id="progress">
Loading...
</p>

now JS:
document.getElementById("progress").innerHTML = "Baby names are being loaded: 35% done...";
bnames[8400] = "__ Edee __ F __ English __ Spoils of war. __ 4 __ 1 __";
bnames[8401] = "__ Edeen __ F __ Scottish __ From Edinburgh __ 3 __ 2 __";
bnames[8402] = "__ Edelina __ F __ English __ Spoils of war. __ 4 __ 4 __";
bnames[8403] = "__ Edelina __ F __ German __ Gracious __ 4 __ 4 __";
bnames[8404] = "__ Edeline __ F __ German __ Gracious __ 4 __ 3 __";
bnames[8405] = "__ Eden __ F __ Hebrew __ Perfect: Pleasure. The gardenlike Biblical first home of Adam and Eve. __ 5 __ 2 __";
-- Another 1000 lines like that
document.getElementById("progress").innerHTML = "Baby names are being loaded: 40% done...";
another 100 lines like:
bnames[8403] = "__ Edelina __ F __ German __ Gracious __ 4 __ 4 __";
document.getElementById("progress").innerHTML = "Database is ready!";

Now the problem is that i see only the first "Loading.."
then after some time the last string "Database is ready!" but not the inner messages like:
"Baby names are being loaded: 40% done..."

Any idea? I tried everything. What am i doing wrong??

Thanks,
Sarit
http://www.my-practical-baby-guide.com/
Hi

the
<p id="progress">
Loading...
</p>
should work fine.

An example short code i tested and works fine is :

var count = 0;
function progress_bar(count)
{

document.getElementById("txtbox").value = "Loading " + count + "%";
document.getElementById("progress").innerHTML = "Loading " + count + "%";
}

function Func1Delay()
{
setTimeout("Func1()", 3000);
}


setTimeout("progress_bar(10)", 1000);
setTimeout("progress_bar(20)", 2000);
setTimeout("progress_bar(30)", 3000);
setTimeout("progress_bar(40)", 4000);
setTimeout("progress_bar(50)", 5000);
setTimeout("progress_bar(60)", 6000);
 
Back
Top