🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: fj.lang.javascript
1 messages
1 total messages Started by MindyCY1 Mon, 26 Jan 1998 00:00
JavaScript Question/Active Image Map problems
#131
Author: 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')">
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads