A Google search for JavaScript image map gives plenty of hits. Aren't they
useful?
Regards, Dave S
----- Original Message -----
From: "Ari Strauch" <strauch_ari@...>
To: <javascript_official@yahoogroups.com>
Sent: Thursday, June 18, 2009 6:35 PM
Subject: [JavaScript] Question for the group
Hi:
I recently joined the group and was hoping to get an answer to a question I
have.
Firstly, thank you so much for having this group and the others similar to
it.
They has come in amazingly handy and have helped so much.
My question is a javascript coding question that I am absolutely desperate
for an answer for.
I have a two images, image1.gif and image2.gif. When you roll over
image1.gif it becomes newimage1.gif and image2.gif becomes newimage2.gif. So
you roll over one and both change. No problem there. The only other thing I
want to do is to get one of the new images - newimage2.gif - to be an image
map.
The code I have now is:
<head>
<SCRIPT language="JavaScript">
<!--
if (document.images) {
pic1on = new Image(226, 93);
pic1on.src = "images/newimage1.gif";
pic2on = new Image(684, 296);
pic2on.src = "images/newimage2.gif";
}
function lightup(imgName, imgName2) {
if (document.images) {
imgOn = eval(imgName + "on.src");
document[imgName].src = imgOn;
imgOn2 = eval(imgName2 + "on.src");
document[imgName2].src = imgOn2;
}
}
//-->
</SCRIPT>
</head>
<body>
<A HREF="" onMouseover="lightup('pic1','pic2')"><IMG SRC="images/image1.gif"
name="pic1" width="226" height="93" border="0"></A>
<br>
<img src="images/image2.gif" name="pic2" width="684" height="296"
border="0">
</BODY>
Does anyone know what I would have to add to the code to make this happen?
If you have any idea and would be able to provide me with the information it
would be GREATLY, GREATLY appreciated. Again, I am desperate.
Thank you for listening and thank you again for all the good work this group
does.
Sincerely,
Ari
[Non-text portions of this message have been removed]
------------------------------------
Visit http://aiaiai.com for more groups to joinYahoo! Groups Links
--------------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.339 / Virus Database: 270.12.77/2184 - Release Date: 06/17/09
17:55:00