• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Creating imagemaps in javascript........??????????????

gar598

Golden Member
this is so confusing!!!!!!!! (or at least i'm making it confusing)


so far I have 5 objects, in which when I roll the mouse over I need it to switch to an image....

I keep on getting "object null" errors so far

here the code (so far):

<HTML>
<HEAD>
<TITLE> Show Animals </TITLE>
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- HIDE FROM INCOMPATIBLE BROWSERS

function change_image(image_name) {
document.imagemap.src = image_name;
}
function reset_image() {
document.imagemap.src = "imagemap.jpg";
}
// STOP HIDING FROM INCOMPATIBLE BROWSERS -->
</SCRIPT>
</HEAD>
<BODY>
<IMG SRC="imagemap.jpg" USEMAP="#imagemap_map" NAME="Animals">
<MAP NAME="imagemap_map">
<area shape=circle coords="62,130,37,121" HREF="dog.jpg"
onMouseOver="change_image('dog.jpg')" onMouseOut = "reset_image()"
onClick="return false">
<area shape=poly coords="59,186" HREF=""
onMouseOver = "change_image('cat.jpg')" onMouseOut = "reset_image()"
onClick="return false">
<area shape=poly coords="208,215" HREF=""
onMouseOver = "change_image('cows.gif')" onMouseOut = "reset_image()"
onClick="return false">
<area shape=poly coords="237,292" HREF=""
onMouseOver = "change_image('horses.jpg')" onMouseOut = "reset_image()"
onClick="return false">
<area shape=poly coords="55,255" HREF=""
onMouseOver = "change_image('birds.jpg')" onMouseOut = "reset_image()"
onClick="return false">
</MAP>
</HEAD>

<BODY>

</BODY>
</HTML>
 
Back
Top