Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2005
    Location
    Surrey, England
    Posts
    286
    Thanks
    2
    Thanked 2 Times in 2 Posts

    DXImageTransform.Microsoft.Fade - Question

    Here's The Script:

    Code:
        <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>
    Code:
              <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

  • #2
    Senior Coder
    Join Date
    Mar 2005
    Location
    Portsmouth UK
    Posts
    4,536
    Thanks
    3
    Thanked 513 Times in 500 Posts


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •