PDA

View Full Version : Image Map ...craZy..!


IBM
07-29-2002, 01:21 AM
<object>
<map name="exMapMain">
<area shape="circle" coords="42,41,25" href="#" title="circle"
onmouseover="window.status='Lookie Lookie...link 1';return true"
onmouseout="window.status='';return true" alt="Circle"/>

<area shape="rect" coords="76,27,163,7" href="#" title="rect"
onmouseover="window.status='testing...testing, Link 2';return true"
onmouseout="window.status='';return true" alt="Rect"/>

<area shape="poly" coords="125,30, 144,48, 144,66, 117,79, 89,69, 90,47"
href="#" title="poly"
onmouseover="window.status='Yessir, Link 3';return true"
onmouseout="window.status='';return true" alt="Poly"/>
</map>
</object>

The above code s my image map code, it should work right...
but strangely only two of the area elements work, the Circle, and Poly, the other..the Rect doesn't work in NS4+ and Opera5+.

Any Ideas about what may be wrong with the code...

welo
07-29-2002, 11:41 AM
Your rectangle has to be built with increasing coordinate integers, so use 7,27,76,163 instead. (these coordinates overlap your circle though).

IBM
07-30-2002, 06:13 AM
Ok.....!

I went and tried what you said...
I figured that the first 2 coords had to be smaller than the last 2 coords...

it works just fine now.


Thanks.

I wouldn't have thought of it on my own....
It's just not something that's common knowledge...or talked about too much.

any other tips you'd like to share?

:thumbsup:

welo
07-30-2002, 08:36 AM
Originally posted by IBM
any other tips you'd like to share?

:thumbsup:

Yep. Buy low, sell high, and never purchase cutting edge technology until they've worked out the bugs.

Oh. You meant something else? :D

ronaldb66
07-30-2002, 09:17 AM
The W3C HTML4.01 specification (http://www.w3.org/TR/html401/struct/objects.html#adef-coords) states how coordinates should be specified.

Also: An apple a day keeps the doctor away. :D

IBM
07-31-2002, 01:09 AM
thx ron.
Yiou've been a great help.

welo..?
nah..sell low, buy high...the idiots guide to going bankrupt.