|
-
Apr 9th, 2005, 04:40 AM
#1
Thread Starter
Fanatic Member
onMouseout !!
Hi there,
The problem is that I can not get the image hidden when I use "onMouseout "event...!!
All I want is that I want imege to be seen when "onmouseover" the link and be hidden when onMouseout
could you please help
thanks in advance..
-------------------------------------------
<body>
<script>
function show()
{
document.getElementById("res").innerHTML="<img src=sabit14.jpg width=100 height=130 style=visibility:visible;>";
}
function clear()
{
document.getElementById("res").innerHTML="";
}
</script>
get your mouse<a href ="#" id=res onMouseover="show()";onMouseout="clear()"> here</a> to see my image..<br>
</body>
-
Apr 9th, 2005, 02:39 PM
#2
Fanatic Member
Re: onMouseout !!
<a href ="#" id=res onMouseover="show()";onMouseout="clear()"
Try taking out the semicolon between the events.
Place a semicolon after each function call but within the " ".
<a href ="#" id=res onMouseover="show();" onMouseout="clear();"
-
Apr 10th, 2005, 03:23 AM
#3
Thread Starter
Fanatic Member
Re: onMouseout !!
Hi,
Thanks..it works but..What I really mean is that I want my image to be hidden(disappear) again when I move my mouse back..but the image is still there...
onMouseover="oh ı can see it!!"
onMouseout="and now it's gone"...thats it..
could you please help me more...
thanks
-
Apr 10th, 2005, 12:51 PM
#4
Fanatic Member
Re: onMouseout !!
HTML Code:
<html>
<head>
<title>Image Rollover</title>
<script type = "text/javascript">
function showImage(){
con.style.display = 'none';
picDiv.style.display = '';
}
function showText(){
con.style.display = '';
picDiv.style.display = 'none';
}
</script>
</head>
<body>
<div id = "picDiv" style = "display:none; width:100px;" onmouseout = "showText();">
<img src = "sabit.jpg" id = "pic" width = "100px" height = "130px" />
</div>
<div id = "con" onmouseover = "showImage();">
Mouseover here to see image
</div>
</body>
</html>
-
Apr 11th, 2005, 02:38 AM
#5
Addicted Member
Re: onMouseout !!
Merhaba, i usually try to stay clear of words such as 'Show' and 'Clear' when naming subs or variables because there is a chance these are stored words
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|