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

A

amp

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.

I've tried to do a quick-and-dirty javascript preload of the image as
well (which I really don't want to have to do), but that didn't even
work.

You can see it at beta.gopulls.com.

Thanks,

Andy
 
C

C A Upsdell

amp said:
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.
 
A

amp

unfortunately, I've tried all the peekaboo workarounds I can find, and
none work. The problem is not a background hidden behind some other
layer (z-index issues), or behind a containing div's background, or at
all related to floated divs.

Right now it's:

<absolute div>
<rel positioned img>
<absolute div>

I've tried wrapping the img in another relatively positioned div as
well, or inside a table, all to no avail. It's like javascript just
doesn't want to load the friggin image.
 
R

Rob ^_^

Hi Amp,

Its a user accessibility setting in Internet Options on the Advanced
tab.(Show Pictures?)

r u using an <img> nested inside a <div>?

You could try setting the picture as the background image of the div i/o
embedded between the div tags.

Hope that helps. You are doing the right thing by testing on the popular
browsers.

Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top