| Senior Member with 2,636 posts. | | | |
@ggordie
From you orginal post, it looks like you want to flip to the same picture for both links. If so, here's an example. HTML Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us">
<head>
<title>mouseover image change</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<style type="text/css">
html {
background: #fff;
color: #000;
font-size: 1em;
}
body {
margin: 0;
padding: 8px;
}
img {
border: 0;
}
img#top {
width: 383px;
height: 74px;
}
ul#links {
list-style: none;
padding: 0;
margin: 10px 0 0 0;
}
ul#links li {
padding: 0;
margin: 0;
}
</style>
<script type="text/javascript">
//<![CDATA[
window.onload = function() {
var tp = document.getElementById("top");
var a = document.getElementById("links").getElementsByTagName("a");
for (var i = 0; i < a.length; i++) {
a[i].onmouseover = function() {
tp.src = "http://www.google.com/intl/en/images/logo.gif";
};
a[i].onmouseout = function() {
tp.src = "http://www.geocities.com/havoc_magazine/images/logo_hm.PNG";
};
}
};
//]]>
</script>
</head>
<body>
<div><img id="top" src="http://www.geocities.com/havoc_magazine/images/logo_hm.PNG" alt="Havoc Mag - Main Logo." /></div>
<ul id="links">
<li><a href="http://www.geocities.com/havoc_magazine/index1.html"><img src="http://www.geocities.com/havoc_magazine/images/button_home.PNG" alt=""/></a></li>
<li><a href="http://www.geocities.com/havoc_magazine/subscribe.html"><img src="http://www.geocities.com/havoc_magazine/images/button_subscribe.png" alt="" /></a></li>
</ul>
</body>
</html>
(I used oldschool events for poor IE's sake.) |