D
deko
I'm using Dreamweaver MX 2004 - trying to change the border width and color
of an image onMouseOver. The desired behavior is for the image to show a
1px blue border onMouseOver and no border onMouseOut.
Here is html code:
<a href="#top" onMouseOver="MM_changeProp('bac_to_top','','border','1px
solid 0000FF','IMG')"
onMouseOut="MM_changeProp('bac_to_top','','border','border 0px','IMG')"><img
src="images/back_to_top.gif" name="bac_to_top"></a>
Here is Dreamweaver-generated javascript:
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
var obj = MM_findObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}
What is happening is nothing. The image just remains as it was with no
border. I am new to javascript... any help is appreciated. Thanks!
of an image onMouseOver. The desired behavior is for the image to show a
1px blue border onMouseOver and no border onMouseOut.
Here is html code:
<a href="#top" onMouseOver="MM_changeProp('bac_to_top','','border','1px
solid 0000FF','IMG')"
onMouseOut="MM_changeProp('bac_to_top','','border','border 0px','IMG')"><img
src="images/back_to_top.gif" name="bac_to_top"></a>
Here is Dreamweaver-generated javascript:
function MM_changeProp(objName,x,theProp,theValue) { //v6.0
var obj = MM_findObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}
What is happening is nothing. The image just remains as it was with no
border. I am new to javascript... any help is appreciated. Thanks!