#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2006
    Posts
    66
    Rep Power
    9

    Image button not working


    Hi everyone,
    i was wondering if anyone had any idea why my image button will not work? but if i were to use a normal submit button it will work great thanks.
    PHP Code:
    Image button not working:
    <
    input name="submit" type="image" SRC="images/go.png" HEIGHT="39" WIDTH="42" BORDER="0">
    Normal button that works:
    <
    input name="submit" type="submit" value="Check" /> 
  2. #2
  3. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2011
    Location
    The Pleiades
    Posts
    299
    Rep Power
    9
    Do a print_r() at the very top of your action file when using image and when using submit.

    What does it return?

    Can you post your HTML file and your action script please?

    Regards,

    NM.
  4. #3
  5. No Profile Picture
    buildmyweb.org
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    NY
    Posts
    74
    Rep Power
    8
    verify the path to your image is correct. you could also apply a null to value and use a background image instead. this would allow for changing states with sprites too.
    Freelance Web Developer | PHP Applications
    Web Development, Hosting, Graphic Design, SEO
  6. #4
  7. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Location
    Ludhiana
    Posts
    33
    Rep Power
    0
    Why have you given the same name to your to your input type="image" and input type="submit" button. This is an error which is why your program is not being run correctly
  8. #5
  9. No Profile Picture
    buildmyweb.org
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    NY
    Posts
    74
    Rep Power
    8
    shellygill, i dont think he's using them at the same time. he's saying that if he substitutes the submit button for the image, it works.
    Freelance Web Developer | PHP Applications
    Web Development, Hosting, Graphic Design, SEO

IMN logo majestic logo threadwatch logo seochat tools logo