Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A mouseover/alt event

Status
Not open for further replies.

Bravogolf

Programmer
Nov 29, 2002
204
GB
Hi guys,
I have typical website, that when in the home/index section there will be an option of three different departments to go to.
Each of the links to each dept is an art file, and they are somewhat self explanatory.
I was hoping to create something similar to the ALT function, whereby the user moves the mouse over the image, and somewhere else, say a text box or preferably another art file will change to a description of what that link is.
I am well aware of the mouseover() function, but I dont want the actual art file to be replace, I want a description or another art file to change somewhere else (ie. under the actual link).

I hope you understand... :)
 
The things in bold need to be changed. In lines like this: jsbtn_0_def = new Image(127,49) the first number is the width and the second number is the height of you image. The first image is the one shown on default the next on is on mouse over.
<HEAD>
<SCRIPT LANGUAGE=&quot;JavaScript&quot;>
<!--
if ( document.images ) {
jsbtn_0_def = new Image(127,49)
jsbtn_0_def.src = &quot;image1.gif&quot;
jsbtn_0_on = new Image(127,49)
jsbtn_0_on.src = &quot;image2.gif&quot;
}
</HEAD>
<BODY>
<br><A HREF=&quot;url&quot;
ONMOUSEOVER=&quot;mouse_over('jsbtn_0');&quot;
ONMOUSEOUT=&quot;mouse_off('jsbtn_0');&quot;><IMG SRC=&quot;image1.gif&quot; NAME=&quot;jsbtn_0&quot; BORDER=&quot;0&quot; WIDTH=&quot;127&quot; HEIGHT=&quot;49&quot; ALT=&quot;Whatever&quot;></A>
</BODY>

I don't know if you can make a text box appear. In this senerio, you would have to make an image that would explain the info.
 
Thank you very much, that is exactly what I need.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top