Area Map

liunx

Guest
I have an image that has an usemap. I have a problem in that I want to use the onclick event to tie the image to a javascript function. But the problem is I loose the cool little hand that lets everyone know that the image is a link.<br />
<br />
There are a couple ways to go around this from the way I see it... to have a href value that does nothing, or use the onmouseover, and onmouseout events to change the mouse icon to the hand, and back to the arrow.<br />
<br />
anyhelp is much appreciated!<!--content-->Adding style="cursor:hand" to a tag gives the hand cursor when hovering the element...<!--content-->I am not sure to where exactly put that code... (noobie here) But I tried the following, and it didn't work...<br />
<br />
<area shape="rect" coords="2,316,102,357" style="cursor:hand" onclick=BasicWndFAQs()><br />
<br />
<br />
Thanks for the help, and any more help greatly appreciated!<br />
<br />
micah<!--content-->Try this adjustment...<br />
<br />
<area shape="rect" coords="2,316,102,357" style="cursor:hand;" onclick="BasicWndFAQs();"><!--content-->That didn't do the trick, sorry.<br />
<br />
I tried many variations of that last suggestion, and nothing!<br />
<br />
Keep um coming!<br />
<br />
micah<!--content-->I suppose it doesn't matter if there's a semicolon in the end of the value of the style attribute, <htmlite>? And isn't the hand cursor default for <area>?<br />
But maybe it helps putting <map> and </map> around the area? And inserting ending </area> tag too? It's just a wild guess.<!--content--><map name="Teknotes"> <br />
<area shape="rect" coords="2,51,103,88" href=http://www.htmlforums.com/archive/index.php/"http://htmlforums.com" target="_top" alt="Forums" title="Forums"><br />
<area shape="rect" coords="2,316,102,357" style="cursor:hand" onclick="BasicWndFAQs()"><br />
</map><br />
<br />
<br />
<br />
there is a more detailed section of what I want to do!<!--content-->Still try to put those closing </area> tags, although I have no idea why they would matter.<!--content-->I got it all figured out, Here it goes!<br />
<br />
Because I wanted to to run some slick stuff on an area map, fixing one thing broke another! You can't have javascript tied to the href. You have to do onclick or some other event. But when you do that you loose the cool hand with the first finger extended.<br />
<br />
To go around this issue, I set the style of the whole image the area map overlayed using onmouseover="this.style.cursor='hand'" in my image declaration. This worked for me because my image has many hotspots, and not too much whitespace.<br />
<br />
So now end result is, the image the area map overlays always has the hand, but hotspots can run javascript!<!--content-->Great that you got it solved. It's a pity that I really couldn't help you.<!--content-->Nah, you guys really did. I didn't know to look for cursor:hand at all... I did a couple of searches on that, and then I found out what to do... Even then it took me a couple of tries to get it right! <br />
<br />
Funny how that works out!<br />
<br />
<br />
micah<!--content-->
 
Back
Top