Hello, I have a web app up at http://niceguy.wustl.edu/NEISGEI/EmisComp
The relative code I'm talking about is the loading image that is
displayed when a request is made, and disappears when the request is
fulfilled.
Now, I got this code from somewhere, and it works beautifully except
for one spot.
There is a div for each loading image. Here's the code for the first:
function addLoadEvent1(func) {
if (window.onload){
var oldonload = window.onload;
if (typeof window.onload != 'function') {
window.onload = func;
}else{
window.onload = function() {
if (oldonload) {
oldonload();
}
func();}
}
}
}
addLoadEvent1(function() {
document.getElementById("loading1").style.display= "none";
});
The second and third functions are exactly the same (addLoadEvent2,
getElementById("loading2"), etc.).
Now, the first two loading images correctly disappear when the images
are finished loading, however the third remains....
Also as an interesting sidenote, when I add an alert("test") or
something to the addLoadEvent1() call, right before the
document.getElement..display=none, the alert doesn't pop up. This
section of the code doesn't get read.
Again, the first two work perfectly.
I hope I didn't make this sound too complicated. If anyone has any
questions I'll respond ASAP. Any ideas and I would be greatly
appreciative.
Thanks!