I have a familytree site that can produce a complete tree (may show thousands of members) which takes some time to figure out. So while loading it shows a picture of a growing tree, and when ready it shows the actual family tree. Works fine in Firefox, but in Chrome it produces an empty page when loaded.
Here is how I did it:
html:
<body onload='JavaScript:show();'> <div id='loader'>...<img ...></div> <div id='tree' class='hidden'>... tree ...</div>
css:
`.hidden {display: none;}`
Javascript:
`function show()
{
let temp = document.getElementById ('loader');
let tree = ocument.getElementById('tree');
temp.hidden = true;
dump.hidden = false;
dump.style.display = 'block';
}`
I was expecting to have the same result in Chrome as in Firefox. FF shows the build tree after loading, but Chrome shows an empty page.
It seems there is a type error in your JavaScript function. Instead of this:
Update your code to this:
However, in your function, the
**dump**variable is not defined anywhere else. Indeed, the functions work well in my local environment.