<div> problem - I think
Hello,
I've tried to get something to work for a week now, and I'm out of gas. What I want to be able to do is to have a link such that when the mouse goes over it, it displays an image map which has multiple links to other pages. I can do this fine, but the problem is I want the image map to disappear when the mouse leaves the image map. I've tried different things with onmouseover and onmouseout functions to either show/hide a , or to change images, but I can not get the image map to disappear once it is displayed. The following is an example of code taken out of the page I'm trying to build. I displays the image map fine with the mouseover. Can anyone explain what I need to do in order to get the image map to disappear when the mouse leaves the image map? Thanks.
Bob
******************************************************8
<script language="javascript">
function show(){
document.thisweek.visibility="show";
}
function hide(){
document.thisweek.visibility="hide";
}
</script>
Mark Hensler posted this at 21:44 — 1st February 2001.
He has: 4,048 posts
Joined: Aug 2000
well, I'm an IE guy, so I don't have a clue how well this works in NN.
<html>
<head>
<script language="javascript">
function show(){
document.thisweek.style.display="";
}
function hide(){
document.thisweek.style.display="none";
}
</script>
</head>
<body>
<a href="#" onmouseover="show()" onMouseOut="hide()"><font color=blue>This week's schedule</a><br>
<div id="thisweek" style="position:absolute; visibility:hidden; top:20; left:150">
<img src="week2.jpg" width=150 height=80 usemap="#bar" border=0>
<MAP NAME="bar">
<AREA SHAPE=RECT COORDS="0,0,150,20" HREF="const.htm">
<AREA SHAPE=RECT COORDS="0,21,150,40" HREF="const2.htm">
<AREA SHAPE=RECT COORDS="0,41,150,60" HREF="const3.htm">
<AREA SHAPE=RECT COORDS="0,61,150,80" HREF="const4.htm">
</MAP>
</div>
</body>
</html>
Mark Hensler
If there is no answer on Google, then there is no question.
Bob posted this at 14:29 — 3rd February 2001.
They have: 117 posts
Joined: Feb 2000
Mark,
Thanks for your reply, but I was not able to get your code to work. However, I did get the following to work with IE:
http://members.aol.com/zionwf/testdiv.html
When you position the mouse over "This week at Zion" you get a hidden div to appear, which disappears when you move the mouse over it and off it again. However, I still get errors using NS. I know you're not a NS guy, but maybe someone else out there can explain how I can change this to work with NS also?? Thanks!
Bob
Mark Hensler posted this at 19:52 — 3rd February 2001.
He has: 4,048 posts
Joined: Aug 2000
sorry. This one is tested in IE5 and works. (tried in NN6, no good)
<html>
<head>
<script language="javascript">
function show(){
thisweek.style.display="";
}
function hide(){
thisweek.style.display="none";
}
</script>
</head>
<body>
<a href="#" onmouseover="show()" onMouseOut="hide()"><font color=blue>This week's schedule</a><br>
<div id="thisweek" style="display: none">dfsgdsgdsg</div>
</body>
</html>
Mark Hensler
If there is no answer on Google, then there is no question.
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.