SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast Zero G's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Images on <input>

    Hey can someone please tell me how to make an image into a submit button for a form? I have seen people use <input> with a value but when I do that I donít seem to be able to change the image with a onmouseover.

  2. #2
    SitePoint Wizard bronze trophy
    Join Date
    Apr 2003
    Posts
    4,095
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't believe you can have a mouseover on an Input tag. You could, however, do a CSS rollover.

  3. #3
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HTML Code:
    <input type="image" src="submitImage.gif" />
    Will use the image src as a submit button.
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  4. #4
    SitePoint Enthusiast Zero G's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you show me how I could so a rollover for this?

  5. #5
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    Join Date
    Jan 2003
    Location
    Calgary, Canada
    Posts
    2,063
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure! [img]images/smilies/biggrin.gif[/img]
    HTML Code:
    <input type="image" src="submitImage.gif" onmouseover="this.src = 'rolloverImage.gif';" onmouseout="this.src = 'submitImage.gif';" />
    Hope that helps [img]images/smilies/smile.gif[/img]
    Who walks the stairs without a care
    It shoots so high in the sky.
    Bounce up and down just like a clown.
    Everyone knows its Slinky.

  6. #6
    SitePoint Enthusiast Zero G's Avatar
    Join Date
    Jun 2002
    Location
    Ohio
    Posts
    63
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey thanks!

    I thought I tried something like this a wile ago to spiff up my forms but I remember I was experiencing problems. Well it seems to work now! Cool looking forms here I come!


Bookmarks

Posting Permissions

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