Rollovers

Katie

New Member
I want to create a rollover when the mouse is not over there is just html. When the mouse is over there is the same html but also a squiggle mark (an image) under the html. Does anyone have any ideas?

Thanks!
 

StephanieCordray

New Member
NOt exactly sure what you mean by a squiggle line... you mean where there should be an image? if so, it could be the path to your image isn't correct.
 

Katie

New Member
I just meant an image (which is a squiggly line). When the mouse is over there is the html and an image pops up under it. When the mouse is not over there is just the html.
 

StephanieCordray

New Member
you have to do it with javascript or css. you can't have it just plain html and have a rollover... however you can have it set with just a background or an image that is the same color as the background for the inactive state and an image for the mouseover. unless you're using css for the layout I'd recommend using a simple javascript.

<script language="JavaScript">
<!--
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[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.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))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&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.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}

//-->
</script>
</head>
<body bgcolor="#ffffff" onLoad="MM_preloadImages('image name +extension (eg. .gif or .jpg');">
<td><img name="rollover image name or background" src="image name" >
</td>
<td><a href="#" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage('image name','','image name +extension',1);"><img name="image name" src="image name + extension"></a></td>
 
Top