Forum Moderators: open

Message Too Old, No Replies

Image map and mouse over.

Possible to have onMouseOver event on image map?

         

winstun

4:42 pm on Nov 27, 2003 (gmt 0)

10+ Year Member



I'm wondering how to get an onMouseOver event ( or any mouse event ) with regards to an image map.

Any help is appreciated and thanks in advance.

Alternative Future

4:54 pm on Nov 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi winstun,

This is the properties to have the event within the map:

<map name="my_map">
<area shape="rect" alt="my domain" coords="79,68,161,113" href="w ww.domain.com" title="my domain" onMouseOver="onmouseoverEvent" onMouseOut="onmouseoutEvent">
<area shape="default" nohref>

HTH,

-gs

winstun

5:21 pm on Nov 27, 2003 (gmt 0)

10+ Year Member



Thanks for the quick response, AF.

I had tried that initially, calling a js function, but to no avail ( that's why I posted, 8~P ). I'll double check to make sure there's no typo's or anything.

cheers,
winstun

Alternative Future

5:27 pm on Nov 27, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



winstun,

Are you placing javascript inside the tag before the function name like below?

<script language=javascript>
function test(){
alert("hi");
}
</script>

onMouseOver="javascript:test()"

I have tested this and all works fine in IE not tested in Netscape or anyother though...

edit Just tested it without the javascript:test() and it also works! Lets know how you get on

-gs

winstun

6:25 pm on Nov 27, 2003 (gmt 0)

10+ Year Member



What you have in both posts is what I was originally going with. Unfortunately, I got hit with a higher priority project so I won't be able to work on it till tomorrow likely. I did a quick check during lunch; this is what I have:
 <map name="hmap">
<area shape="poly" coords="314,81,314,68,234,68,234,77,238,81" href="#" alt="map" onMouseOver="javascript:window.status='myString';return true;" onMouseOut="javascript:window.status='otherString';return true;"> </map>

This works on other objects in the page, but not this map.
- in Explorer, btw.

Heh, it's gonna bug me till I get back to it.

Thanks again.