PDA

View Full Version : how to do this



coolguy23
May 6th, 2001, 20:05
i want to make a navbar so that when you hover over a pic, a bunch of text or a pic appears on a certain part of the page, i know i seen this b4 but i don't know how to do it, can someone help?

polestar
May 7th, 2001, 13:53
One way is to use the overLIB java library. You can see the result on the navbar on my page (click on my sig \/)
That text could equally well be an image, preloaded via javascript.

The overLIB homepage is at:
http://www.bosrup.com/web/overlib/

And help is at hand on the overLIB yahoo group:
http://groups.yahoo.com/group/overlib

Maybe there's a simpler way for people who are fluent in java, I don't know.

coolguy23
May 7th, 2001, 16:13
no no, i want the one where you hover over a pic and another pic shows somewhere specified on the page, can any 1 help?

meow
May 7th, 2001, 17:22
What about some javascript then?

.....................................

<HTML>
<HEAD>
<TITLE></TITLE>
<SCRIPT type="text/javascript" language="javascript">
<!--


// preload
if (document.images) {
hide_pic = new Image(xx,yy); hide_pic.src = "transparent.gif";
show_pic = new Image(xx,yy); show_pic.src = "YourImage.gif";
}


function hideShow(imgName,imgObjName) {
if (document.images) {
document.images[imgName].src = eval(imgObjName + ".src");
}}


//-->
</SCRIPT>
</HEAD>


<BODY>

<A href="" onMouseOver="hideShow('img01','show_pic')" onMouseOut="hideShow('img01','hide_pic')">
Show the picture
</A>

<BR><BR><BR>

<IMG src="transparent.gif" width="137" height="xx" border="yy" name=img01>
</BODY>
</HTML>
.....................................

yourimage.gif = the image you want to show (and the path to it)
transparent.gif = a 1*1 pixel transparent gif used when the image is "hidden"
xx = the image's width
yy= the image's height
Note how "name" is used in the image tag and in the A tag.

The text link can of course as well be an image.