View Full Version : javascript on top

01-23-2007, 12:35 AM
hey guys, im having a problem , im using the lightbox gallery script , but when an image opens up near my javascript embedded flash animations the flash animations go over it, so the image goes behind the flash animations. if someone could tell me how i can get javascript to not display over things, but go to the back of everything else, or somehow to get my lightbox gallery to go over the javascript flash animations, that would be very helpful thank you, :(

01-23-2007, 04:51 AM
Follow the detailed information at:


Or, if this short version (good in most cases) fixes it, so much the better! Add in this language to your object/embed tag:

Add the following parameter to the OBJECT tag:

<param name="wmode" value="transparent">

Add the following attribute to the EMBED tag:


01-23-2007, 06:29 AM
your the best, thanks a lot, :)

01-25-2007, 12:05 AM
oh, i think i got a confusing anwser,... i can not add anything to the object or embed tag because i embedded it using javascript :( and i dont see an embed or object tag in there, only div tags and what not. any suggestions to get the same effect but with javascript? sorry to bother everyone again with this stupid noobish question.

01-25-2007, 04:56 AM
I'd have to see the code. Can you supply a link to your page? If nothing else, an object/embed may be applied via script. Actually, I believe this is what is happening anyway. If so, it would just be a matter of adding the param and attribute to the code in the script.

01-28-2007, 09:55 PM
the code for the page looks like this, the flash object in that script is what i need the lightbox image to go over, so i need that javascripted flash animation to be behind it >.<

</div> </td>
<td width="300" valign="top"> <p align="center"><br>
<img src="banner22.jpg" width="160" height="600"><br>
<script type="text/javascript" src="flashobject.js"></script>
</p> <div id="flashcontent2" style="width: 300px; height: 160px"></div>
<div align="center">
<script type="text/javascript">
var fo = new FlashObject("mp3player.swf", "animationName", "300", "160", "8");
fo.addParam("allowScriptAccess", "sameDomain");
fo.addParam("quality", "high");
fo.addParam("scale", "noscale");
fo.addParam("loop", "true");

01-28-2007, 10:01 PM
Try adding

fo.addParam("wmode", "transparent");

to the above snippet, or post the code to flashobject.js as well so that could edit that to suite your need.

Hope this helps.

01-29-2007, 11:06 PM
i'll test it thanks for your input

EDIT: it worked perfectly, thank you :)

02-02-2007, 12:14 AM
Not a problem. Glad it's working for you.