Thank you, Beau. The connect strategy worked.
I change it to this, and it works (based on the idea of not showing
changing anything until the image is fully loaded:
// Preload image
preload = new Image();
preload.src = imgsrc;
// Load Pretext
var tpretext = document.createElement('span');
tpretext.innerHTML = pretext;
// Load Image
var img = document.createElement('img');
img.setAttribute("src",imgsrc);
img.setAttribute("USEMAP",imgmap);
img.setAttribute("border","0");
// Load Posttext
var textra = document.createElement('span');
textra.innerHTML = extratext;
img.onload = function () {
while (target.hasChildNodes()) {
target.removeChild(target.firstChild);
}
target.appendChild(tpretext);
target.appendChild(img);
target.appendChild(textra);
};
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MochiKit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/mochikit
-~----------~----~----~----~------~----~------~--~---