...

View Full Version : Change text on Image mouseover



Lucian5000
04-17-2005, 04:01 AM
For my new website, I'm trying to get a navigation bar with image links.. Now the images themselves don't change, I want the text to change, when you mouseover the image link.

Visual representation:
[1] [2] [3] [4]
[ Boxed in area for blurbage ]

Mouseover image 1, changes the blurb in the boxed in area to "Blurb 1", Mouseover image 2, changes the blurb to "blurb 2" and so on..

the blurbs will be just a little description on what's on the page (as the images themselves don't have words)


Any ideas?

_Aerospace_Eng_
04-17-2005, 04:06 AM
this should give you an idea

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script type="text/javascript">
<!--
function onover(what){
document.getElementById('text').innerHTML=''+what+'';
}
function onout(){
document.getElementById('text').innerHTML='';
}
-->
</script>
</head>

<body>
<a href="#" onmouseover="onover('This is some text')" onmouseout="onout()">Mouseover Me</a>
<a href="#" onmouseover="onover('This is some other text')" onmouseout="onout()">Mouseover Me</a>
<div id="text"></div>
</body>
</html>

Lucian5000
04-17-2005, 04:10 AM
I think that'll work. Thanks a ton!

Lucian5000
04-17-2005, 04:43 AM
Just want to say thanks again. It looks great, and works great too!

_Aerospace_Eng_
04-17-2005, 04:51 AM
yw glad to have helped.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum