🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fj.lang.javascript
Article #131

JavaScript Question/Active Image Map problems

#131
From: MindyCY1
Date: Mon, 26 Jan 1998 00:00
62 lines
2521 bytes
hi!

I recently integrated some javascript into my website (I didn't really learn
any of it...a friend just send over some code and I cut and pasted it, lol).  I
used javascript to create an active image map which works fine in
netscape...problem is, msie3.0 doesn't support the script, and people have been
emailing me telling of error messages saying, "object image not defined"
something or other.  I know there's a way to eliminate the error messages, but
I don't know how...here's a part of my script...any help would be greatly
appreciated!

Thanks, Mindy.

<SCRIPT LANGUAGE="javascript">
<!-- 
function dynamic_image_0(imgName) {
             document [imgName].src = img_default.src;
           
     }

function dynamic_image_1(imgName) {
             document [imgName].src = img_1.src;
           
     }

function dynamic_image_2(imgName) {
             document [imgName].src = img_2.src;
           
     }

function dynamic_image_3(imgName) {
             document [imgName].src = img_3.src;
           
     }

	
//image to show when highlighted
  
		     img_default = new Image(); 		
             img_default.src = "gecko3.gif";                  
             img_1 = new Image(); 		
             img_1.src = "intro.gif";              
             img_2 = new Image(); 
             img_2.src = "poetry.gif";              
             img_3 = new Image(); 		
             img_3.src = "prose.gif";            
//-->
</SCRIPT>

<IMG SRC="gecko3.gif" USEMAP="#siteindex" name="img_0" ALT="Site Index"
BORDER=0 HSPACE=10>

<MAP NAME="siteindex">
<area shape=rect coords="161,90,197,102" href="intro.html" alt="Intro"
onMouseover = "dynamic_image_1('img_0')" onMouseOut="dynamic_image_0('img_0')">
<area shape=rect coords="161,116,212,127" href="issue4/poetry/index.html"
alt="Poetry" onMouseover ="dynamic_image_2('img_0')"
onMouseOut="dynamic_image_0('img_0')">
<area shape=rect coords="161,140,205,149" href="issue4/prose/index.html"
alt="Prose" onMouseover = "dynamic_image_3('img_0')"
onMouseOut="dynamic_image_0('img_0')">
Technical Details
Message-ID: <19980126182800.NAA22407@ladder01.news.aol.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103a72,db5861b9601180fe,start
X-Google-Attributes: gid103a72,public
From: mindycy1@aol.com (MindyCY1)
Subject: JavaScript Question/Active Image Map problems
Date: 1998/01/26
Message-ID: <19980126182800.NAA22407@ladder01.news.aol.com>
X-Deja-AN: 319432642
X-Admin: news@aol.com
Organization: AOL http://www.aol.com
Newsgroups: fj.lang.javascript