WebBuilder101 - Making the web happen!
Need Web Dev software? Here is the place to
Flash Point
Triggering rollovers from a link


Note that  the script goes in the HEAD of the document and reference tags go in the body.

<Html>
<Head>
<title>Triggering rollovers from a link</title>

<script language=javascript>

<!-- Hide script from old browser

if (document.images)
{ imageOff=new Image (
width,height);
imageOff.src="
your-image.gif";

imageOn1=new Image (width,height);
imageOn1.src="
your-second-image.gif";}

function swapImage(imgName) {
if (document.images) {
eval (' document.changingImage.src=' + imgName + ' .src ');}
} function swapImageBack() {
if (document.images) document.changingImage.src=imageOff.src;}

}

// end hiding script from old browsers -->
</script>

<Body bgcolor=white>

<!-- this is the link that will trigger the effect // -->
<
p align="center"><small><a

href="http://www.your-link.com" onMouseOver="swapImage( ' imageOn1' );"

onMouseOut="swapImageBack();"><font face="Arial">Move the mouse over this link</font></a>

<!-- this is the location of the reference image for the script // --> </p>

<p align="center"><img src="your-image.gif" name="changingImage" border="0"

hspace="0" vspace="0" width="0" height="0">

</body>
</html>

 

Click here to see what it looks like

.

 

More Resources
Scrolling Text
Taking and pasting input to your web page
Customize Messages
Change Background colors
Alert the user
Put the current date on your site

Suggested Reading

Beginning Active Server Pages 3.0
JavaScript Bible
Red Hat Linux
Dreamweaver 3.0
HTML Bible



Download WB101 Wallpaper
• Web Builder 101 Wallpaper Get it!.
• Find out how to create your own Wallpaper Teach me!.
Sign up for our Newsletters
• Web Building Sign me Up!.
• Net Alert! Sign me Up!.
Need Help?
• Contact Support Click here.
• E-mail the Webmaster Click Here.
• Search Tips Click Here.

Webbuilder101.com © 1998 - 2003 Copyright and Terms of Use
Send mail to: webmaster@webbuilder101.com

» About » Support

» FAQ » What's New » MyLog

Web Builder 101 Web Builder 101 - Making the Web Happen Web Builder 101 - Making the Web Happen
.