I cant wrap my head around this one.
I have a bit of code that looks like:
<div id=”loader” style=”display:none;”>Loading..</div>
function blah(){
loader.style.display = “”;
… do a bunch of stuff…
loader.style.display = “none”;
}
Now when i run the function, the whole screen sorta locks up until its done and “Loading..” is never displayed. If, however, i take out the ‘loader.style.display = “none”;’ bit, i will see the loading message AFTER the function has run.
My only going theory is that the function, which is cpu intensive, locks the browser and prevents it from updating the div. Either that or there is some weird javascript/html stuff going down that i dont understand.
Anyone have any thoughts on this?