Search the web
Sign In
New User? Sign Up
JavaScript_Official · JavaScript . AJAX . ActionScript
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Question for the group   Message List  
Reply | Forward Message #16707 of 16813 |
Re: [JavaScript] Question for the group

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




Thu Jun 18, 2009 10:03 pm

smartware_co...
Offline Offline
Send Email Send Email

Forward
Message #16707 of 16813 |
Expand Messages Author Sort by Date

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...
Ari Strauch
strauch_ari
Offline Send Email
Jun 18, 2009
5:10 pm

A Google search for JavaScript image map gives plenty of hits. Aren't they useful? Regards, Dave S ... From: "Ari Strauch" <strauch_ari@...> To:...
David Smart
smartware_co...
Offline Send Email
Jun 18, 2009
10:09 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help