Click to See Complete Forum and Search --> : Image Mapping


lord__icon
04-22-2003, 07:31 PM
can I use an onclick in an area tag if so is this correct if not where would i put the onclick for the area

thanks

<map name="foo">

<area name="strait" shape="Rect" coord="200,50;345,530" href="#" onclick="fadeOutthree();fadeInseven()">

</map>

<div id="thirdLayer" STYLE="width: 200" >
<img src="3.jpg" usemap="#foo" >
</div>

DrDaMour
04-22-2003, 07:35 PM
onmouseover works, so i'd think on click would too, why didn't you just try it to see though?

lord__icon
04-22-2003, 07:42 PM
i have tryed it its just not going to the fade function
since this page that its is on is not published would that matter.
I have also tryed ading style="cursor:load" to the area to see if its just not working and i and not getting the cursor

DrDaMour
04-22-2003, 07:49 PM
if you mean by published that you are using some HTML editor, it might matter, but if you mean you just haven't uploaded it, then it shouldn't matter at all. You'd have to post or link all your code to fix a problem with yoru fader.

what i woudl suggest FirST is to change your onclick to
onclick="alert()" this will let you test if the onclick even is working for you, if taht works then you know it's your function, if that doesn't work then you know it's your map.

lord__icon
04-22-2003, 07:54 PM
i tryed the following

<map name="foo">
<area name="strait" shape="Rect" coord="200,50;345,530" href="#" onclick="alert('test')" >
</map>

<div id="thirdLayer" STYLE="width: 200" >

<img src="3.jpg" usemap="#foo" >
</div>

i added the onclick="alert('test')" and it did not work.
but i highlighted the image and the mapped part is shaded a diffrent color meaning it is mapping the right area?

DrDaMour
04-22-2003, 08:04 PM
are you using a browser to check this, or an html editor's preview? onclick worked fine for me when i tested it. So if you are using a browser, than your map coordinates are wrong, upload the file to some webspace or upload the image that you're using.