View Full Version : DHTML Thumbnail Image Viewer

01-24-2008, 04:39 AM
1) Script Title:
DHTML Thumbnail Image Viewer
2) Script URL (on DD):
3) Describe problem:

New to these forums. Pretty cool Dynamic does something like this. Really helps us amateurs out.

I have a miniscule problem.

I have a piece of flash on my page. I also have the DHTML Image Viewer (the one which fades in and enlarges the the original thumbnail).

The problem is, on IE, when I click on the thumbnail to enlarge it, it enlarges, but always appears BEHIND the flash animation. I dont have the problem or firefox, safari and opera.

I am not sure if it has anything to do with the z-index? Dont think it does to be honest.

My script looks like this (i typed this really quick and in a simple manner):

<div><Flash Animation using the famous swfObject></div>
<div id="Image Gallery">
<div id="images>
<li><a href="" etc...the DHTML code></li>
<li><a href="" etc...the DHTML code></li>
<li><a href="" etc...the DHTML code></li>

If you need the full script I can pop it up, just gonna have to get it from work.

thanks guys

01-24-2008, 05:03 AM
swfobject.js simply creates an object or an embed tag, depending upon the browser that is viewing the page, and imports it from an external script. It is this importation that has the pleasant side effect of overriding 'click to activate' and 'press space bar to activate' in IE and Opera, perhaps others.

The script assumes certain attributes and parameters for these tags, defaults to others, makes none of certain ones unless you tell it to. I suspect that you have told it to set the attribute wmode to transparent. This takes care of the problem you are having, but only for those browsers that use the embed tag. IE uses the object tag, so you also have to tell the script to set the param wmode to transparent. Once you do that, it will take care of things in IE as well.

At least that's the theory. There are various version of swfobject out there, and some may even default one or the other or both of the tags that they make to wmode transparent. If that's already set properly, either by your instruction or automatically, then it would become a matter of z-index, and also of the position style property, which must be set to relative or absolute for the Flash in order for the z-index of the gallery to enable it to appear over the Flash (the gallery is already absolutely positioned).

If this hasn't cleared things up for you:

Please post a link to the page on your site that contains the problematic code so we can check it out.