...

View Full Version : DXImageTransform.Microsoft.Fade - Question



danielwarner
12-26-2005, 02:25 PM
Here's The Script:


<script type="text/javascript">
var bTranState = 0;
function fnToggle() {
oTransContainer.filters[0].Apply();
if (bTranState=='0') {
bTranState = 1;
oDIV2.style.visibility="visible";
oDIV1.style.visibility="hidden";
oDIVa.style.visibility="hidden";
oDIVb.style.visibility="hidden";}
else {
bTranState = 0;
oDIV2.style.visibility="hidden";
oDIVa.style.visibility="hidden";
oDIVb.style.visibility="hidden";
oDIV1.style.visibility="visible";}
oTransContainer.filters[0].Play();}
function aToggle() {
oTransContainer.filters[0].Apply();
if (bTranState=='0') {
bTranState = 1;
oDIVa.style.visibility="visible";
oDIV1.style.visibility="hidden";
oDIV2.style.visibility="hidden";
oDIVb.style.visibility="hidden";}
else {
bTranState = 0;
oDIV2.style.visibility="hidden";
oDIVa.style.visibility="hidden";
oDIVb.style.visibility="hidden";
oDIV1.style.visibility="visible";}
oTransContainer.filters[0].Play();}
function bToggle() {
oTransContainer.filters[0].Apply();
if (bTranState=='0') {
bTranState = 1;
oDIVb.style.visibility="visible";
oDIV1.style.visibility="hidden";
oDIVa.style.visibility="hidden";
oDIV2.style.visibility="hidden";}
else {
bTranState = 0;
oDIV2.style.visibility="hidden";
oDIVa.style.visibility="hidden";
oDIVb.style.visibility="hidden";
oDIV1.style.visibility="visible";}
oTransContainer.filters[0].Play();}
</script>


<div style="width: 888; height: 522; z-index: 1; overflow: hidden;">
<DIV ID="oTransContainer" STYLE="position:absolute; top: 244px; left: 115px; width:442; height:169; filter:progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0.0) ">
<DIV ID="oDIV1" STYLE="position:absolute; top:0px; left:0px; width:442; height:169; background-image: URL(images/29.gif);"></DIV>

<!-- Josh's Bio -->

<DIV ID="oDIV2" STYLE="visibility:hidden; position:absolute; top:0px; left:0px; width:442; height:169; background-image: URL(images/bio_bg.gif);">
<img src="images/bio_josh.gif" border="0" alt="Josh - Guitar//Vox" style="position: absolute; top: 8; left: 150; z-index: 1;" />
</DIV>

<!-- Andy's Bio -->

<DIV ID="oDIVa" STYLE="visibility:hidden; position:absolute; top:0px; left:0px; width:442; height:169; background-image: URL(images/bio_bg.gif);">
<img src="images/bio_andy.gif" border="0" alt="Andy - Bass//Vox" style="position: absolute; top: 8; left: 150; z-index: 1;" />
</DIV>

<!-- Ashley's Bio -->

<DIV ID="oDIVb" STYLE="visibility:hidden; position:absolute; top:0px; left:0px; width:442; height:169; background-image: URL(images/bio_bg.gif);">
<img src="images/bio_ashley.gif" border="0" alt="Ashley - Drums" style="position: absolute; top: 8; left: 150; z-index: 1;" />
</DIV>
</DIV>

http://www.savethelecture.co.uk/new/index.html

If you click on one of the band member's name's then the fading div works perfectly... the problem is if you then click another band member whilst the first is active. what happens is that the first div fades but then the second div doesnt load after it...

im not very good at javascript so can someone help me with this please... im sure its simple but it has had me puzzled for a while now

vwphillips
12-26-2005, 06:36 PM
try

http://www.vicsjavascripts.org.uk/ToolTipFade/ToolTipFade.htm



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum