1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How To Display An Image Over An Area But Mouseclick On Underneath

Discussion in 'HTML & JavaScript' started by gimme4free, Oct 15, 2009.

  1. gimme4free

    gimme4free Executive VIP Jr. VIP Premium Member

    Joined:
    Oct 22, 2008
    Messages:
    1,914
    Likes Received:
    1,940
    Home Page:
    E.g. I want a submit button on my page:
    <input type="submit" value="Click Me!" />

    But I want to have an image over top of it so that when the image is clicked it will actually click the button.

    Is this possible? I know that Harro posted the adsense method for having an image over the adsense ads before but not sure if this will work the same way.
     
  2. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland
    use opacity and z-index to make 2 layers or just use IMG as a submit button and use JS to send form :)
     
  3. 195471

    195471 Regular Member

    Joined:
    Oct 11, 2008
    Messages:
    417
    Likes Received:
    260
    You could do it this way:

    Code:
    <form id="form1" action="http://www.whateveryouwant.com" method="get">
    <input type="image" src="button.jpg" />
    </form>
    
     
  4. nerdmoney

    nerdmoney Junior Member

    Joined:
    Feb 24, 2008
    Messages:
    135
    Likes Received:
    37
    Occupation:
    web nerd
    The simplest answer always seems to be the last to be seen :)
     
    • Thanks Thanks x 1