Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    image coordinates as link

    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.

  • #2
    Regular Coder
    Join Date
    Jan 2006
    Posts
    568
    Thanks
    6
    Thanked 84 Times in 84 Posts
    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):

    Code:
    <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>
    Last edited by gusblake; 12-14-2009 at 11:09 PM.

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by babno View Post
    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:

    Code:
    <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

  • #4
    New to the CF scene
    Join Date
    Dec 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •