[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1564
  • Last Modified:

help firefox not allowing this code?

function fade(obj,st)
{
            
    obj.style.filter="blendTrans(duration=3)";
    obj.filters.blendTrans.apply();
    obj.style.visibility=st;
    obj.filters.blendTrans.play();
   
}

works fine in IE but not in firefox?

<a href='index2.php'><img src="test.jpg" onload="fade(this, 'visible')" style=visibility:hidden border=0></a>
0
aot2002
Asked:
aot2002
  • 3
1 Solution
 
ZvonkoSystems architectCommented:
That works in IE    ONLY!!!!
0
 
aot2002Author Commented:
is there one that works for both?
0
 
aot2002Author Commented:
or can i just show the image instead



function fade(obj,st)
{
            if (checkIt('msie')){            
    obj.style.filter="blendTrans(duration=3)";
    obj.filters.blendTrans.apply();
    obj.style.visibility=st;
    obj.filters.blendTrans.play();
    }else{
          
           obj.style.display = 'block';
          
    }
}
0
 
aot2002Author Commented:
this did the trick




function checkIt(string) {
    var detect = navigator.userAgent.toLowerCase();
    place = detect.indexOf(string) + 1;
    thestring = string;
   return place;
}



function fade(obj,st)
{
            if (checkIt('msie')){            
    obj.style.filter="blendTrans(duration=3)";
    obj.filters.blendTrans.apply();
    obj.style.visibility=st;
    obj.filters.blendTrans.play();
    }else{
          
           obj.style.display = 'block';
           obj.style.visibility = 'visible';
    }
}
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now