PDA

View Full Version : Gradual fade javascript doesn't work on Explorer



sbinga
03-27-2009, 08:05 AM
1) Script Title: Gradual fade javascript doesn't work on Explorer

2) Script URL (on DD): www.robertogiangrande.com

3) Describe problem: I've read other posts on this problem but i really can't understand why the gradual fade on my homepage works on EVERY browser except for Internet Explorer (no matter what the version is) (i've read the "limitations" at the bottom of the code's page).

Here's my code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta name="keywords" content="giangrande, photography, digital photography, roberto, reportage, architecture, berlin, mexico, portraits, video"
<script type="text/javascript" src="gradualfader.js">

/***********************************************
* Gradual Element Fader- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
* Visit http://www.dynamicDrive.com for hundreds of DHTML scripts
* This notice must stay intact for legal use
***********************************************/


</script>

<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Roberto Giangrande photographer - personal website</title>
<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onLoad="MM_preloadImages('images/m1_2.gif','images/m2_2.gif')" >
<table cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td valign="top" width="766" height="514">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="739" height="185">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="470" height="185">
<div style="padding-left:55px; padding-top:105px "></div>
</td>
<td valign="top" width="270" height="185">
<div style="padding-left:0px; padding-top:101px "><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('r1','','images/m1_2.gif',1)"></a><a href="indexes/index-info.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('r2','','images/m2_2.gif',1)"></a><a href="indexes/index-contacts.html"><img src="images/m3.jpg" alt="" name="r3" border="0"></a><a href="indexes/index-info.html" target="_parent"><img src="images/m4.jpg" alt="" name="r4" border="0"></a></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="739" height="329">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="37" height="329">
<div style="padding-left:24px; padding-top:99px "><a href="index-8.html"><img src="images/p2.gif" alt="" border="0"></a></div>
<div style="padding-left:24px; padding-top:0px "><img src="images/p3.gif" alt=""></div>
</td>
<td valign="top" width="701" height="329">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="701" height="8"><img src="images/top.gif" alt=""></td>
</tr>
<tr>
<td valign="top" width="701" height="306">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" width="9" height="306" style="background:url(images/left.gif) "></td>
<td valign="top" width="680" height="306">
<div style="padding-left:0px; padding-top:0px "><a href="indexes/portraits/index-portraits-1.html"><img src="images/1_p1.jpg" alt="" border="0" class="gradualfader" style="width: 25%" /></a><a href="indexes/berlin/index-berlin-1.html"><img src="images/1_p2.jpg" alt="" border="0" class="gradualfader" style="width: 25%"/></a><a href="indexes/mexico/index-mexico-1.html"><img src="images/1_p3.jpg" alt="" border="0" class="gradualfader" style="width: 25%"/></a><a href="indexes/misc/index-misc-1.html"><img src="images/1_p4.jpg" alt="" border="0" class="gradualfader" style="width: 25%"/></a></div>
</td>
<td valign="top" width="12" height="306" style="background:url(images/right.gif) "></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" width="701" height="15"><img src="images/bottom.gif" alt=""></td>
</tr>
</table>
</td>
<td valign="top" width="28" height="329"></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<script type="text/javascript">
gradualFader.init() //activate gradual fader
</script>

<!-- Start of StatCounter Code -->
<script type="text/javascript">
var sc_project=4582544;
var sc_invisible=1;
var sc_partition=56;
var sc_click_stat=1;
var sc_security="cf45dc21";
</script>

<script type="text/javascript"
src="http://www.statcounter.com/counter/counter.js"></script><noscript><div
class="statcounter"><a title="stats for wordpress"
href="http://www.statcounter.com/wordpress.com/"
target="_blank"><img class="statcounter"
src="http://c.statcounter.com/4582544/0/cf45dc21/1/"
alt="stats for wordpress" ></a></div></noscript>
<!-- End of StatCounter Code -->

</body>
</html>



I'M SORRY, I DON'T KNOW HOW TO QUOTE A CODE (AND WHICH PART OF IT COULD BE USEFUL OR NOT...). HOPE I DIDN'T DO ANYTHING WRONG. THANKS. ROBERTO