Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

missing images

3 views
Skip to first unread message

Paula K

unread,
Nov 6, 1999, 3:00:00 AM11/6/99
to
Hi,

We are working on a problem where images are not consistently loading when a
large constructed HTML string is assigned to the innerHTML of an element.
The images exist in the document but for those images that do not appear,
the image.complete value is false. No loading errors occur. It is very
inconsistent as sometimes the images will load. Clearing the browser cache
causes the problem more, then simply reloading, which seems to eventually
make most of the images appear.

The HTML string is over 2k bytes long and has six different image references
as well as text and controls. The text always shows up, the drop down list
boxes always show up but things like buttons don't always show up.
Does anyone have any ideas?

Roby

unread,
Nov 6, 1999, 3:00:00 AM11/6/99
to
Hi,

I suppose you are experiencing the problem on IE5 (no problem with NS,
strange enough! ;-), where I had the same problem. The solution was to
"preload" images through the Image object ( var = new Image() etc. etc.).

Hope this help

Regards

Roberto Galanti


Paula K <pau...@geocities.com> wrote in message
#1ywChHK$GA.226@cppssbbsa05...

Paula K

unread,
Nov 6, 1999, 3:00:00 AM11/6/99
to
Thanks, I was kinda hoping that would not be the case! I suspected a bug in
IE5, but, I don't see anything published on this problem. It feels like the
IE5 rendering engine just doesn't work well with DHTML through innerHTML or
adjacentHTML. Its like it starting loading them all then forgets to check
to see if there loaded so that they can be displayed. what's weird is that
the DOM has the images but the image element attributes are not there
because the image load was not completed. It would be nice if someone from
Microsoft could comment on this (afterall, I could still be doing something
dumb!)

Paula

Roby <rgal...@iol.it> wrote in message news:eJEH0BIK$GA.232@cppssbbsa05...

Peter Torr (MS)

unread,
Nov 6, 1999, 3:00:00 AM11/6/99
to
"Paula K" <pau...@geocities.com> wrote in message
news:ONHLk8JK$GA.282@cppssbbsa04...

> It would be nice if someone from
> Microsoft could comment on this (afterall, I could still be doing
something
> dumb!)

Yo,

I'm investigating...

Peter

--
Peter J. Torr - Microsoft Windows Script Program Manager
pt...@microsoft.com - http://msdn.microsoft.com/scripting/
Please do not e-mail me with questions - post them to this
newsgroup instead. Thankyou!

Peter Torr (MS)

unread,
Nov 8, 1999, 3:00:00 AM11/8/99
to
Hi,

Someone suggesting this work-around - basically, after adding the innerHTML,
you then insert some adjacentHTML and immediately remove it. This should
cause the element to repaint.

var Elem = document.whatever;
Elem.innerHTML = "whatever";
var Index = Elem.sourceIndex;
// Fixup the image bug
setTimeout("forceImagePaint()",100);

// Forces repainting of an image by inserting a dummy image
// and then removing it
function forceImagePaint()
{
Elem = tbContentElement.DOM.all[Index];
Elem.insertAdjacentHTML("beforeEnd","<img id='imgHack' " +
"style='display:none' src='/images/1pxt.gif'>");

document.all.item("imgJ").outerHTML="";

Eddie

unread,
Nov 12, 1999, 3:00:00 AM11/12/99
to
"Work-around". Does this mean that this is a known issue. Can we expect a
patch sometime...hopefully soon?

Thanks.
__________________

In article <ug3RUbgK$GA.242@cppssbbsa04>,

--
Eddie, eddie...@yahoo.com (remove 123 to email)
http://www.angelfire.com/pe/eddie


Sent via Deja.com http://www.deja.com/
Before you buy.

George G.

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
Paula,
 
Test #3 did not work for me. It did not show the button image on the bottom. 1,2 and 4 worked fine. I am using latest IE 5.
 
Regards,
George.
 
 
Okay, here is very interesting code frag for all you trying to figure out
why all the images you load in an insertadjacentHTML do not always load!

There are four tests.  Three out of the four work fine.  One of the four
(the way one would expect it to work) has the chacteristic of trying to load
4 (count them!) images after the insertadjacentHTML and the browser will
just sit their spinning until it times out! (occassionally actually getting
the images after many minutes!)  Perhaps Microsoft could comment on why, so
that we could all understand the specific folk lore we need to know to keep
our code running! (I really _do_ like the MS guys, but lets face it, there
is a lot of folk lore in making things run right!)

Send me your comments! What am I doing wrong! Give me a hint why this
happens and I'll be _very_ happy

from the inquireing mind of Paula!

Thanks for reading this!




Armand

unread,
Nov 24, 1999, 3:00:00 AM11/24/99
to
Paula,
 
Well said!  I played with your code for a few minutes and found that test 2 took two clicks to work.  (Press Clear, Test2, Test2)  So, if at first you don't succeed...
 
I repeated the insert command and it works all of the time, I think:
 
 daDiv.insertAdjacentHTML('BeforeEnd',sHTML);
 daDiv.insertAdjacentHTML('BeforeEnd',sHTML);
or
 
 daDiv.innerHTML=sHTML;
 daDiv.innerHTML=sHTML;
Also, it will never work if the insert is preceded by clearing the HTML:
 
 daDiv.innerHTML="";
 daDiv.insertAdjacentHTML('BeforeEnd',sHTML);
 
or
 daDiv.innerHTML="";
 daDiv.innerHTML=sHTML;
 
Thanks for a fun time.  Prior to this, I had a most pleasurable time with a Sun JVM feature.  And, a special thanks to both Microsoft and Sun!  It's getting to be just like real science.
 
Regards,
Armand, FTSB
 
0 new messages