...

View Full Version : image coordinates as link



babno
12-14-2009, 09:48 PM
I am making a model interface in html. what I need to do is use coordinates to make a button (its a square button) a link to another page. what would be the code for it and how might I figure out the coords for the button. Thank you kindly as google was less than helpful.

gusblake
12-14-2009, 09:53 PM
Can you be more specific?

Edit - on a second read, it looks like you're talking about an image map. Here's an example of the syntax (from google):



<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap" />

<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" />
<area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury" />
<area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus" />
</map>

oesxyl
12-14-2009, 10:13 PM
I am making a model interface in html. what I need to do is use coordinates to make a button (its a square button) a link to another page. what would be the code for it and how might I figure out the coords for the button. Thank you kindly as google was less than helpful.
I'm guessing:



<input type="image" name="myxy" src="your image file here" alt="..." />

after click you can access coords as myxy.x and myxy.y.

best regards

babno
12-14-2009, 11:06 PM
thank you very much gusblake, got it working fine. sorry for the vague question, I wasn't entirely sure what i was asking for either (quite possibly why I had issues with google)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum