PDA

View Full Version : Help on a text link that has a onmouseover image



fn4all7
11-11-2006, 01:16 PM
Hi,

I'm a student of html not of javascript. I'm trying to find a script that will show a thumbnail image, when you mouseover the text link.
I found one but was unable to make it work. Please help !!!

Thanks

VatsaL
11-11-2006, 04:43 PM
<html>
<script>
function showTip (elementId){
var tip = document.getElementById(elementId);
tip.style.display = "block";
}
function hideTip (elementId){
var tip = document.getElementById(elementId);
tip.style.display = "none";
}
</script>
<style type="text/css">
#tip{
display:none;
width:0px;
}
</style>
<body>

<div id="thing" onmouseover="showTip('tip');" onmouseout="hideTip('tip');">mouseover here!</div>
<div id="tip"><center><img src="http://www.albanygateway.com.au/Member/Albany_Primary_school/new_2/tiny%20green%20plant%20thumbnail.jpg"</img></center></div>
</body>

</html>

enjoy.