View Full Version : How to set: submit button variables??

01-27-2005, 03:21 PM
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"

<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"

01-28-2005, 05:52 AM
okay... say you adjust it like so.... (so that my xplanation can b a lil clearer)

<form name....>
<input type='text'>
<input type=Submit value=Postpone name=postponeButton>
<input type=Submit value=Save name=saveButton>
On form submission u can access it in this way:

for example.... u could now attempt the following

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!