473,386 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

After page load image rendering in IE

I am currently having an issue where I render 3 1k images to the page
in IE when the user clicks a button. Everything works well in FF and
Good Browsers et al., but in IE I have to wrap some dummy code with a
while(!tempImg.complete) to get each image to load. If I do not use
the while loop then somewhat randomly the images are not visible even
though they appear to have been rendered. In this 'invisible' case I
can right-click the 'hole' where the image is and choose Show Picture
from the contectual menu and then the image appears.

So, if anyone knows how to solve this problem, I would love to hear
about it.

Jan 29 '07 #1
5 3695
VK
On Jan 29, 9:58 pm, "getburl" <adampbr...@gmail.comwrote:
I am currently having an issue where I render 3 1k images to the page
in IE when the user clicks a button. Everything works well in FF and
Good Browsers et al., but in IE I have to wrap some dummy code with a
while(!tempImg.complete) to get each image to load. If I do not use
the while loop then somewhat randomly the images are not visible even
though they appear to have been rendered. In this 'invisible' case I
can right-click the 'hole' where the image is and choose Show Picture
from the contectual menu and then the image appears.
I don't know of your particular case - a URL would be most helpful. I
noticed a random funny behavior of IE 6 on some sites where image
placeholders are shown despite images are cached and "loaded" as far
as DOM is concerned. Using "Show image" from contextual menu makes the
image appear. This behavior appeared this year only AFAIK - and I
noticed it on a random basis but only on rather "sound" sites like say
NASA Saturn section <http://saturn.jpl.nasa.gov/home/index.cfm>
That makes me wonder if some fancy header/protocol went into fashion
on corporate servers and IE6 chokes on it. Pure speculation, can be
totally unrelated to your problem. Some URL would really help.

Jan 29 '07 #2
On Jan 29, 11:38 am, "VK" <schools_r...@yahoo.comwrote:
On Jan 29, 9:58 pm, "getburl" <adampbr...@gmail.comwrote:
I am currently having an issue where I render 3 1k images to the page
in IE when the user clicks a button. Everything works well in FF and
Good Browsers et al., but in IE I have to wrap some dummy code with a
while(!tempImg.complete) to get each image to load. If I do not use
the while loop then somewhat randomly the images are not visible even
though they appear to have been rendered. In this 'invisible' case I
can right-click the 'hole' where the image is and choose Show Picture
from the contectual menu and then the image appears.I don't know of your particular case - a URL would be most helpful. I
noticed a random funny behavior of IE 6 on some sites where image
placeholders are shown despite images are cached and "loaded" as far
as DOM is concerned. Using "Show image" from contextual menu makes the
image appear. This behavior appeared this year only AFAIK - and I
noticed it on a random basis but only on rather "sound" sites like say
NASA Saturn section <http://saturn.jpl.nasa.gov/home/index.cfm>
That makes me wonder if some fancy header/protocol went into fashion
on corporate servers and IE6 chokes on it. Pure speculation, can be
totally unrelated to your problem. Some URL would really help.
This application is not in a publicly accessible space at the moment
so I can't provide a URL, sorry. This is quite bothersome since it
seems that the only thing IE is not doing is drawing the image. The
image is in the dom, it is taking up space visually on the displayed
page, but there is nothing in its place. There is not even the little
red X. It seems odd that IE would take so long to get a new copy of
the image from the server though. I know it does not take a minute to
get 3 1k images from our server because the initial page is more than
3k and returns in less than a second.

Please, more speculation. It does help. Thank you.

Jan 29 '07 #3
VK
On Jan 29, 11:56 pm, "getburl" <adampbr...@gmail.comwrote:
On Jan 29, 11:38 am, "VK" <schools_r...@yahoo.comwrote:
Please, more speculation. It does help. Thank you.
Without a single hint that would take forever making theories. The
first thing would be to re-check the most obvious, even if it seems
correct.
1) Make sure that image URLs are bulletproof correct in all cases.
2) Make sure that your script doesn't generate any errors

If persists then make the minimum case reproducing your problem and
post the code here. Also what is your server: IIS or Apache or some
other? If (1) and (2) checked this may gain some misterious to the
moment importance.

Jan 29 '07 #4
getburl wrote:
I am currently having an issue where I render 3 1k images to
the page in IE when the user clicks a button. Everything works
well in FF and Good Browsers et al., but in IE I have to wrap
some dummy code with a while(!tempImg.complete) to get each
image to load. If I do not use the while loop then somewhat
randomly the images are not visible even though they appear
to have been rendered. In this 'invisible' case I can
right-click the 'hole' where the image is and choose Show
Picture from the contectual menu and then the image appears.
'Somewhat random' problems relating to the displaying of images occurring
in IE (at least up to version 6) and occurring after the clicking of a
"button" are frequently a direct consequence of the execution of a
javascript pseudo-protocol HREF. That is, if your "button" is actually a
link, and has an HREF attribute in the form -
"javascript:something();" -(or anything beginning "javascript:") then the
clicking on the link is take as navigation by IE, and the current page
goes into a new 'state' pending the replacement of its contents. In that
new state various aspects of the javascript environment, and normal
browser facilities become unreliable or unavailable, including swapped
IMG sources not being rendered, at all or reliably.
So, if anyone knows how to solve this problem, I would
love to hear about it.
If that describes your situation you cure the problem by never activating
a javascript pseudo-protocol HREF that does not directly result in the
replacing of the current page. In the context of a link you could do that
by moving the javascript code from the HREF and into an onclick handler,
remembering to return false from that handler to prevent the link from
following whatever URL is specified in its HREF attribute. Or you abandon
using links to trigger javascript and instead use <input type="button">
elements (possibly heavily styled with CSS).

Richard.

Jan 29 '07 #5


On Jan 29, 1:42 pm, "Richard Cornford" <Rich...@litotes.demon.co.uk>
wrote:
getburl wrote:
I am currently having an issue where I render 3 1k images to
the page in IE when the user clicks a button. Everything works
well in FF and Good Browsers et al., but in IE I have to wrap
some dummy code with a while(!tempImg.complete) to get each
image to load. If I do not use the while loop then somewhat
randomly the images are not visible even though they appear
to have been rendered. In this 'invisible' case I can
right-click the 'hole' where the image is and choose Show
Picture from the contectual menu and then the image appears.'Somewhat random' problems relating to the displaying of images occurring
in IE (at least up to version 6) and occurring after the clicking of a
"button" are frequently a direct consequence of the execution of a
javascript pseudo-protocol HREF. That is, if your "button" is actually a
link, and has an HREF attribute in the form -
"javascript:something();" -(or anything beginning "javascript:") then the
clicking on the link is take as navigation by IE, and the current page
goes into a new 'state' pending the replacement of its contents. In that
new state various aspects of the javascript environment, and normal
browser facilities become unreliable or unavailable, including swapped
IMG sources not being rendered, at all or reliably.
So, if anyone knows how to solve this problem, I would
love to hear about it.If that describes your situation you cure the problem by never activating
a javascript pseudo-protocol HREF that does not directly result in the
replacing of the current page. In the context of a link you could do that
by moving the javascript code from the HREF and into an onclick handler,
remembering to return false from that handler to prevent the link from
following whatever URL is specified in its HREF attribute. Or you abandon
using links to trigger javascript and instead use <input type="button">
elements (possibly heavily styled with CSS).

Richard.
Richard,

YOU ARE THE MAN!!
You were fully correct and I appreciate your time and effort. I doubt
I will be able to, but I do hope that I can return the favor some
time. You topped out my current application with your solution and
ended my frustration.

Thank you.

Adam

Jan 30 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Charlie | last post by:
Hi I am using the following code to create an image viewer for multiple images. var pageImage = document.images; var image = new Image(); var args = GetQuerystring(); //return arguments from...
4
by: Els | last post by:
Hi, I would like an opinion on the following: I have a page which is made up of background-images with transparent linked images in front of it, which on hover show text in CSS popups. Due to...
3
by: usenet | last post by:
Hi All, I have some initialization to be done at page load time, which changes the text of some anchors so that they are consistent with the query string (these anchors are used as criteria...
2
by: Jeronimo Bertran | last post by:
I have an aspx page that shows a complex image with several objects that are sensitive to mouseover events. The information about the objects in the image is obtained from a database and complex...
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
2
by: TS | last post by:
when i try to do a response.flush and .end, the screen ends up blank. I want all page processing to quit when a check in the pageload event fails. Since control events occur after load, how do i...
4
by: Ravi Ambros Wallau | last post by:
Hi: We developed a set of ASP.NET Web Applications that never runs in stand-alone mode, but always inside a portal (Rainbow Portal). All modules are copied on that portal. My question is: load...
3
by: Mike Dee | last post by:
Hi, I'm having an issue with the status bar in Mozilla and Netscape showing that it is still waiting on the page to load even after it is finished. This problem does NOT occur with IE. In...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.