SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Evangelist lance_vincent's Avatar
    Join Date
    Aug 2004
    Location
    philippines
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    form.submit () problems

    hi guys!

    i have this form..but instead of using two submit buttons, i am using 2 images with onclick="form.submit();". now on the next page, i need to know which image was clicked?

    how can i do that? somehow my next page (a php script) must be able to know what image was clicked.

    thanks for the replies!
    If you won't dress like the
    Victoria Secret girls,
    don't expect us to act like soap opera guys.

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put each <img> in a <button> instead of misusing JavaScript.

    I am concerned that your code is not following JavaScript Best Practices. I strongly recommend you read up on them.

    Code:
    <button type="submit" name="submit1"><img src="" alt=""></button>
    <button type="submit" name="submit2"><img src="" alt=""></button>
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Evangelist lance_vincent's Avatar
    Join Date
    Aug 2004
    Location
    philippines
    Posts
    574
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a bunch man!
    If you won't dress like the
    Victoria Secret girls,
    don't expect us to act like soap opera guys.


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
  •