Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how could I make some IE filter working in firefox

Posted on 2007-07-28
2
Medium Priority
?
587 Views
Last Modified: 2008-01-09
how could I make some IE filter working in firefox ?
my code is :

function change_inc(picture)
{
  picture.src="a_Sample.png";
  logo_opc(picture)
}
function change_dec(picture)
{
  picture.src="p_Sample.png";
  dec_opc(picture)
}

var i = 10; //global variable
var t;
var currentpicture;
function logo_opc(picture){
   if(picture) {
     currentpicture = picture;
   } else {
     picture = currentpicture;
   }
   window.clearTimeout(t);
   if(i<=100){
     picture.filters.item("DXImageTransform.Microsoft.Alpha").opacity = i;
     i++;
     t=window.setTimeout('logo_opc()',10);
   } else return false;
}

function dec_opc(picture){
   if(picture) {
     currentpicture = picture;
   } else {
     picture = currentpicture;
   }
   window.clearTimeout(t);
   if(i>30){
     picture.filters.item("DXImageTransform.Microsoft.Alpha").opacity = i;
     i--;
     window.setTimeout('dec_opc()',10);
   } else return false;
}
// -->
</SCRIPT>


    <IMG id="logo" NAME="m1" SRC="p_Sample.png" BORDER="0" ONMOUSEOVER="change_inc(this)"
            ONMOUSEOUT= "change_dec(this)" STYLE="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30)">

this is not working in firefox but it do in IE, any help plz ?
0
Comment
Question by:Ameerh24
2 Comments
 
LVL 30

Accepted Solution

by:
third earned 2000 total points
ID: 19584852
try this,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Third Santor</title>
<script>
function change_inc(picture)
{
  picture.src="http://www.google.com.ph/intl/en_com/images/logo_plain.png";
  logo_opc(picture)
}
function change_dec(picture)
{
  picture.src="http://www.google.com.ph/intl/en_com/images/logo_plain.png";
  dec_opc(picture)
}

var i = 10; //global variable
var t;
var currentpicture;
function logo_opc(picture){
   if(picture) {
     currentpicture = picture;
   } else {
     picture = currentpicture;
   }
   window.clearTimeout(t);
   if(i<=100){
     if(document.all){
     picture.filters.item("DXImageTransform.Microsoft.Alpha").opacity = i;
       }
       else{       
       picture.style.MozOpacity = i/100;
       }
       document.getElementById('myDiv').innerHTML = i;
     i++;
     t=window.setTimeout('logo_opc()',10);
   } else return false;
}

function dec_opc(picture){
   if(picture) {
     currentpicture = picture;
   } else {
     picture = currentpicture;
   }
   window.clearTimeout(t);
   if(i>30){
     if(document.all){
     picture.filters.item("DXImageTransform.Microsoft.Alpha").opacity = i;
       }
       else{    
       picture.style.MozOpacity = i/100;
       }
       document.getElementById('myDiv').innerHTML = i;
     i--;
     window.setTimeout('dec_opc()',10);
   } else return false;
}
</script>
</head>
<body>

<IMG id="logo" NAME="m1" SRC="http://www.google.com.ph/intl/en_com/images/logo_plain.png" BORDER="0"  STYLE="filter:progid:DXImageTransform.Microsoft.Alpha(opacity=30); -moz-opacity:0.3;" ONMOUSEOVER="change_inc(this)"
            ONMOUSEOUT= "change_dec(this)">
<div id="myDiv"></div>
</body>
</html>
0
 

Author Comment

by:Ameerh24
ID: 19587521
it works fine
thank you
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I've been trying to accomplish this for a while and it just struck me yesterday how to accomplish this task. I have done searches all over the internet looking for ways to email pages from my applications and finally I have done it!!! Every single s…
The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question