Given the following Java Script running on Firefox, I get the alert after the image is displayed on the screen, as it should:
document.getElementById(c).children[0].src = "i/" + table16[c] + ".png";
alert(c);
However, if I run the same script on Chrome, I get the alert before the image is displayed on the screen. This is causing problems. Why does this happen? How can I force Chrome to fully execute the first line before processing the second line?