SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    Git-R-Done
    Join Date
    Nov 2001
    Posts
    1,194
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why Doesn't My Submit Image Work?

    For some reason, the code that I always use for a submit image button isn't working for this particular form. Can somebody tell me what is causing it not to work?

    These buttons work:

    <input type=submit value=Yes name=button>
    <input type=submit value=No name=button>

    These are the buttons I can't get to work:
    Code:
    <a href="java script:document.form1.submit();" onmouseover="changeImages('yes', 'images/yes_over.gif'); return true;" onmouseout="changeImages('yes', 'images/yes.gif'); return true;"><img name="button" src="images/yes.gif" value="yes" id="button"></a>
    Code:
    <a href="java script:document.form1.submit();" onmouseover="changeImages('no', 'images/no_over.gif'); return true;" onmouseout="changeImages('no', 'images/no.gif'); return true;"><img name="button" src="images/no.gif" value="no" id="button"></a>
    John Saunders

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you just use an input type=image ??

    They act just like submit buttons!
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev





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
  •