Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Jan 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to set: submit button variables??

    Hello,
    I have simple insert record page. (asp vbscript)
    However, I want to give users the ability to submit a half filled form and return later and fill it out.

    So one button will be "Finished" the other will be "Save & Finish Later"
    Code:
    <input type="submit"  name="finished" value="Finished name="finished">
    <input type="submit" name="save" value="Save & Finish Later">

    How can I do something so I can set my ASP vars different, meaning
    If form="finished" {
    PageAfterSubmission = "thanks.asp"
    }
    Else if form="save" {
    PageAfterSubmission = "OKfinishLater.asp"
    }


  • #2
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Thumbs up

    okay... say you adjust it like so.... (so that my xplanation can b a lil clearer)

    Code:
    <form name....>
     <input type='text'>
     ...
     ...
     ...
     <input type=Submit value=Postpone name=postponeButton>
     <input type=Submit value=Save name=saveButton>
    </form>
    On form submission u can access it in this way:
    request.form(buttonName)=buttonValue

    for example.... u could now attempt the following
    Code:
    if request.forum("postponeButton")="Postpone" then 
     ....
    
     else if request.form("saveButton")="Save" then
      ....
    
    end if
    When you space out your button names.... like u did.... It will appear in request.form or request.queryString as "Finish+later"

    So u might also wanna look into that

    But for the mean time... try just using "get" method and writing out the queryString to get a better feel of what u r dealin with


    hope that helps!
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished


  •  

    Posting Permissions

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