Hey everyone!
Got a weird question.
I use the <map> with <area> tags. If I don't place a href, there will be no 'hand' as cursor. <area> tags don't have the 'cursor-style', so I can't use that one.
Do I have to sneaky make this fake href? Isn't there another way?
Try this, then you'll know what I mean!:
<html>
<body>
<map id=mapID>
<area shape=rect coords=0,0,50,50 title="area1-NOHREF-NO.HAND" nohref onClick="javascript: alert('no hand');">
<area shape=rect coords=50,0,100,50 title="area2-HREF-sneaky" href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:;"">
</map>
<img src='' width=100 height=50 useMap=#mapID>
</body>
</html>
Thanks for all your help!
PS.: the img src='' isn't important...Why do you want to use an image map with no links in it?
Why do you want to use an image map?
<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/imagemap/Originally">http://www.alistapart.com/articles/imagemap/Originally</a><!-- m --> posted by lavalamp
Why do you want to use an image map with no links in it?
For example I want a function to be executed. I know you can do it on the href, but the href doesn't know the event objects as 'event.x' or so. So, instead of executing something on the href, (HYPERLINK reference) I want to execute it on the 'onClick' event.
Originally posted by lavalamp
Why do you want to use an image map?
I've got a project to make a hotspot editor. So I have to place hotspots on an image.
I'll read your document (link).Originally posted by JayDie
I'll read your document (link).
I understand this article. But... If I should use it... I won't be able to create polygon area's...? Only rectangles, because a <div> is a rectangle... Also no circles...
What about it?Hi!
If you need the functionality of the onclick event for your stuff, why not use:
<area shape="rect" coords="0,0,50,50" title="area1-NOHREF-NO.HAND" href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:void(0);" onClick="alert('no hand belongs to the past');">
?
Cheers - PitYes, that's a little bit the same as I did, only yours is 'nicer'
java script:;vsjava script:void(0);
Got a weird question.
I use the <map> with <area> tags. If I don't place a href, there will be no 'hand' as cursor. <area> tags don't have the 'cursor-style', so I can't use that one.
Do I have to sneaky make this fake href? Isn't there another way?
Try this, then you'll know what I mean!:
<html>
<body>
<map id=mapID>
<area shape=rect coords=0,0,50,50 title="area1-NOHREF-NO.HAND" nohref onClick="javascript: alert('no hand');">
<area shape=rect coords=50,0,100,50 title="area2-HREF-sneaky" href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:;"">
</map>
<img src='' width=100 height=50 useMap=#mapID>
</body>
</html>
Thanks for all your help!
PS.: the img src='' isn't important...Why do you want to use an image map with no links in it?
Why do you want to use an image map?
<!-- m --><a class="postlink" href="http://www.alistapart.com/articles/imagemap/Originally">http://www.alistapart.com/articles/imagemap/Originally</a><!-- m --> posted by lavalamp
Why do you want to use an image map with no links in it?
For example I want a function to be executed. I know you can do it on the href, but the href doesn't know the event objects as 'event.x' or so. So, instead of executing something on the href, (HYPERLINK reference) I want to execute it on the 'onClick' event.
Originally posted by lavalamp
Why do you want to use an image map?
I've got a project to make a hotspot editor. So I have to place hotspots on an image.
I'll read your document (link).Originally posted by JayDie
I'll read your document (link).
I understand this article. But... If I should use it... I won't be able to create polygon area's...? Only rectangles, because a <div> is a rectangle... Also no circles...
What about it?Hi!
If you need the functionality of the onclick event for your stuff, why not use:
<area shape="rect" coords="0,0,50,50" title="area1-NOHREF-NO.HAND" href=http://www.webdeveloper.com/forum/archive/index.php/"javascript:void(0);" onClick="alert('no hand belongs to the past');">
?
Cheers - PitYes, that's a little bit the same as I did, only yours is 'nicer'
java script:;vsjava script:void(0);