How can i add a link to my image button

Discussion in 'HTML & Website Design' started by ASTRAPI, Mar 19, 2010.

  1. #1
    Hello

    I have an image using this code:

    <input type="image" name="ImageButton1" id="ImageButton1" src="images/skailogo.gif">
    Code (markup):
    And i want when a user click on it to load a page1.html located to src="page1.html

    How can i do it?
     
    ASTRAPI, Mar 19, 2010 IP
  2. Basti

    Basti Active Member

    Messages:
    625
    Likes Received:
    6
    Best Answers:
    3
    Trophy Points:
    90
    #2
    why using input?

    
    <a href="http://www.site.com"><img src="/images/blabla.gif" alt="" /></a>
    
    Code (markup):
     
    Basti, Mar 19, 2010 IP
  3. ampg-it

    ampg-it Peon

    Messages:
    75
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Can you just add a link tag around it like this?

    <a href="page1.html"><input type="image" name="ImageButton1" id="ImageButton1" src="images/skailogo.gif"></a>
     
    ampg-it, Mar 19, 2010 IP
  4. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ok thanks :)

    It works only in Firefox and the image buttons are anot clickable in Internet Explorer :(
     
    Last edited: Mar 19, 2010
    ASTRAPI, Mar 19, 2010 IP
  5. ASTRAPI

    ASTRAPI Guest

    Messages:
    500
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    ok fixed thanks :)
     
    Last edited: Mar 20, 2010
    ASTRAPI, Mar 20, 2010 IP