Re: Javascript call to change img src is successful, but the image won't show.



amp wrote:
I can't seem to find anyone with this unique problem that's bugging me
to death:

Rather than use a pop-up to display an image, I want to use an
absolutely positioned div with a high z-index. When a link is clicked,
I use Javascript to switch in the appropriate image and trigger the div
to be visible.

Unfortunately, while it works beautifully in firefox and opera, IE will
not load the friggin image. It just sits there all nice and blank, and
if you right-click on the image and select "Show Picture", it appears.

Oddly, if you select "Properties" instead of Show Picture, IE will even
tell you the correct image dimensions.

IE has z-index problems. I suggest you google on IE and z-index and look for a description of problems and work-arounds. Caution: some workarounds may fail with Opera, especially older versions of Opera, so make sure you test with several versions.

Another possibility is that you are encountering an instance of the IE peekaboo bug: google on that to.
.



Relevant Pages

  • Javascript call to change img src is successful, but the image wont show.
    ... Rather than use a pop-up to display an image, ... absolutely positioned div with a high z-index. ... Oddly, if you select "Properties" instead of Show Picture, IE will even ... I've tried to do a quick-and-dirty javascript preload of the image as ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Tough question on posiitioning
    ... In Opera 9.24 and Opera 9.50 b1 ... uses valid markup code, valid CSS code and is a reduced testcase. ...
    (comp.infosystems.www.authoring.stylesheets)