rollover/image.usemap crashes IE

  • Thread starter Jason Fotinatos
  • Start date
J

Jason Fotinatos

Im trying to create a rollover that changes the source of an image on
the right hand side of the page. This set of images also has an image
map associated with it, because links can be clicked on at certain
parts of the image.

To make this possible my javascript function for the rollover is as
follows:

function changeRightImages(imgName,state)
{
doument.images[imgName].src = rightImages[state].src;
document.images[imgName].useMap = "#"+state;
}

* right images is just a array of preloaded images. imgName is just
the name of the image I am changing. State is the 'state' of the image
i want it to become. My image map is setup with a bunch of statements
such as the one below:

<map name="leg">
<AREA SHAPE="rect" ALT="" COORDS="8,221,135,232"
HREF="javascript:alert('why isnt this working!');"
</map>

* where 'leg' is the state i am talking about.
* So the call to changeRightImages("rightImgName","leg"); crashes
IE(and only IE) after about 10 or so times that I click the link to
the alert on the image map, and then rollover the image again. It only
happens when i actually use the map (ie click the link on the image -
i used an alert to show that its not the resource im trying to access
that is causing the prob), and then rollover.
*its definitly the call to .usemap="#"+state; because i took out the
image source change line, and it still bugs out.

- Any ideas anyone? This is killing me! oh microsoft... :( Thanks in
advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,831
Latest member
HealthSmartketoReviews

Latest Threads

Top