sandra
08-28-2007, 02:05 PM
I have used bellow code to make my image highlight. but i want whenever i click on the image it be light till the end.
this code use in head tag:
<script>
function lightup(imageobject, opacity){
if (navigator.appName.indexOf("Netscape")!=-1 && parseInt(navigator.appVersion)>=5)
imageobject.style.MozOpacity=opacity/100
else if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
imageobject.filters.alpha.opacity=opacity
}
</script>
and use this code in to the body:
<img border="0" src="images/thumbnails/1.jpg" width="30" height="30" style="filter:alpha(opacity=50); -moz-opacity:0.5"
onMouseover="lightup(this, 100)" onMouseout="lightup(this, 30)" onMouseClick="lightup(this, 100)">
thank you
this code use in head tag:
<script>
function lightup(imageobject, opacity){
if (navigator.appName.indexOf("Netscape")!=-1 && parseInt(navigator.appVersion)>=5)
imageobject.style.MozOpacity=opacity/100
else if (navigator.appName.indexOf("Microsoft")!=-1 && parseInt(navigator.appVersion)>=4)
imageobject.filters.alpha.opacity=opacity
}
</script>
and use this code in to the body:
<img border="0" src="images/thumbnails/1.jpg" width="30" height="30" style="filter:alpha(opacity=50); -moz-opacity:0.5"
onMouseover="lightup(this, 100)" onMouseout="lightup(this, 30)" onMouseClick="lightup(this, 100)">
thank you