SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    London
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    two submit buttons

    hi guys

    just a quick questions to any one who can help

    I have a page that reviews a submission to a database. On that page i want a button that says 'submit' and goes to the thank you page (ok thats easy done that) but i also want one that says 'cancel' and goes back a page. How can i do this in one form?

    thanks

    JP

  2. #2
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Give the submit buttons names, so you can check on the server side what to do with the submitted data.
    Code:
    <input type="submit" name="action" value="Submit"> 
    <input type="submit" name="action" value="Cancel">
    Simon Pieters

  3. #3
    SitePoint Enthusiast
    Join Date
    Aug 2004
    Location
    Houston, TX
    Posts
    71
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    <input type="button" value="Cancel" onClick="javascript:history.back()">

  4. #4
    SitePoint Zealot
    Join Date
    Jul 2003
    Location
    London
    Posts
    189
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the onClick works fine thanks!!


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
  •