I swear I went through about 11 pages of a “rollover” search, and I couldn’t find this specific problem, or if I did, I don’t understand enough about coding to get it.
The offending page is here:
[url]http://performingartscamp.net/template/pearty.html
The rollover works fine in firefox (the menu “buttons” appear pressed), but in IE, not only do they not work, but the first image hops to the last one and stretches out.
I have been over and over the code, and I guess I can’t see the forest from the trees anymore.
The offending code is here:
[CODE]<script language=”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.0
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 && document.getElementById) x=document.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 BGCOLOR=#B2A489 MARGINHEIGHT=0 onLoad=”MM_preloadImages(‘images/buttonpress_03.gif’,’images/buttonpress_04.gif’,’images/buttonpress_05.gif’,’images/buttonpress_06.gif’)”>
<font style=”font-size: 10pt” face=”Georgia”>
<TABLE WIDTH=780 BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR>
<TD COLSPAN=5>
<IMG SRC=”images/PSbanner_01.gif” WIDTH=780 HEIGHT=206 ALT=””></TD>
</TR>
<TR>
<TD>
<IMG SRC=”images/PSbanner_02.gif” WIDTH=215 HEIGHT=41 ALT=””></TD>
<TD>
<a href=”aboutus.html” onMouseOut=”MM_swapImgRestore()” onMouseOver=”MM_swapImage(’03’,”,’images/buttonpress_03.gif’,1)”><IMG SRC=”images/PSbanner_03.gif” WIDTH=104 HEIGHT=41 ALT=”” border=0 name=”03″></a></TD>
<TD>
<a href=”myreferences.html” onMouseOut=”MM_swapImgRestore()” onMouseOver=”MM_swapImage(’04’,”,’images/buttonpress_04.gif’,1)”><IMG SRC=”images/PSbanner_04.gif” WIDTH=137 HEIGHT=41 ALT=”” border=0 name=”04″></a></TD>
<TD>
<a href=”ourprocess.html” onMouseOut=”MM_swapImgRestore()” onMouseOver=”MM_swapImage(’05’,”,’images/buttonpress_05.gif’,1)”><IMG SRC=”images/PSbanner_05.gif” WIDTH=112 HEIGHT=41 ALT=”” border=0 name=”05″></a></TD>
<TD>
<a href=”sampleapp.html” onMouseOut=”MM_swapImgRestore()” onMouseOver=”MM_swapImage(’06’,”,’images/buttonpress_06.gif’,1)”><IMG SRC=”images/PSbanner_06.gif” WIDTH=212 HEIGHT=41 ALT=”” border=0 name=”06″></a></TD>
</TR>
I think the stuff in the script tag is supposed to be commented out with <!– –>s, but when I take them out, IE doesn’t work at all. I have also (thanks to the search) tried replacing “name” with “id,” to no avail.
Also: I originally got this code from Dreamweaver back in the day.
Another weird thing is that this same code was used on this page:
[url]http://www.honeybeemanor.com/rolltest.html
And that works FINE in IE!
(Please ignore the images…I made that as a test page for a friend of mine.)
Okay, I’m done. Thank you in advance for all your help!