Back to Scripts page
Click in the box below, select all and copy to grab the script
<HTML> <HEAD> <TITLE>Combining rollovers & image maps</TITLE> <SCRIPT LANGUAGE=JAVASCRIPT> <!-- Hide script from old browsers // This script copyright 1997, Tom Negrino and Dori Smith. // This script is from "JavaScript for the WWW, Visual QuickStart Guide, 2nd Ed." // For more information, see <http://www.chalcedony.com/javascript/>. // This script may be used and modified, but the copyright notice must remain intact. if (document.images) { img1 = new Image img2 = new Image img3 = new Image imgBlue = new Image imgRed = new Image img1.src = "testGreen1.gif" img2.src = "testGreen2.gif" img3.src = "testGreen3.gif" imgBlue.src = "testBlue.gif" imgRed.src = "testRed.gif" } else { img1 = "" img2 = "" img3 = "" imgBlue = "" imgRed = "" document.roll = "" } // End hiding script from old browsers --></SCRIPT> </HEAD> <BODY BGCOLOR=WHITE> <P><TABLE BORDER=0> <TR> <TD WIDTH="132"> <P><A HREF="home.html" onmouseover="document.roll.src=imgBlue.src" onmouseout="document.roll.src=imgRed.src"> <MAP NAME="roll_test"> <AREA SHAPE=RECT COORDS="0,0,120,60" HREF="sec1.html" onmouseover="document.roll.src=img1.src"> <AREA SHAPE=RECT COORDS="0,60,120,120" HREF="sec2.html" onmouseover="document.roll.src=img2.src"> <AREA SHAPE=RECT COORDS="0,120,120,180" HREF="sec3.html" onmouseover="document.roll.src=img3.src"> </MAP> <IMG USEMAP="#roll_test" SRC="testRed.gif" WIDTH=120 HEIGHT=180 BORDER=0 ALIGN=bottom name=roll></A> </TD><TD VALIGN=top> <H3>Thanks for visiting our site. You'll find some of the best JavaScript information on the Web right here, much of which we also put into our book, JavaScript for the World Wide Web, Visual QuickStart Guide, Second Edition, published by Peachpit Press. You can find out more by clicking on the info box to the left.</H3> </TD></TR> </TABLE></P> </BODY> </HTML>