473,387 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Forms w/ two buttons

YT
Greetings,

Just wondering if someone out there can help with this issue.

I have a questionnaire that i'm building. Each step is a separate web page with a form and a next button & back button, similar to a wizard.

What i would like to do is to make sure that all the information on the form gets retained. i'm doing this via asp & session cookies. So when the user clicks the next button, the form info is submitted and put into session cookies. if the page is redisplayed for whatever reason, the form will be pre-filled out with the user's input. No problem there.

My issue is that if the user clicks on the Back button, i would like the information to be stored as well. SO i have one form, 1 set of input that needs to be stored in session cookies, but two buttons. One that saves the input and takes the user to the next step, and the other that saves the input and sends the user back one step.

Any ideas?

thx,
yt

Jul 20 '05 #1
3 3259
"YT" <yt******@MAPSONfunkychickens.org> wrote:
Greetings,

Just wondering if someone out there can help with this issue.

I have a questionnaire that i'm building. Each step is a separate web page with a form and a next button & back button, similar to a wizard.

What i would like to do is to make sure that all the information on the form gets retained. i'm doing this via asp & session cookies. So when the user clicks the next button, the form info is submitted and put into session cookies. if the page is redisplayed for whatever reason, the form will be pre-filled out with the user's input. No problem there.

My issue is that if the user clicks on the Back button, i would like the information to be stored as well. SO i have one form, 1 set of input that needs to be stored in session cookies, but two buttons. One that saves the input and takes the user to the next step, and the other that saves the input and sends the user back one step.

Any ideas?


Have the page to which the form submits save the data from the current
page, check which button was clicked, and then redirect to the
appropriate new page.

--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #2
"YT" <yt******@MAPSONfunkychickens.org> wrote:
I have a questionnaire that i'm building. Each step is a separate web
page with a form and a next button & back button, similar to a
wizard.
How often will users want to go back? A questionnaire is not a wizard.
Besides, what does "going back" mean here? Something else than using a
Back button?

Unless there are special reasons to provide some special "back"
functionality, I'm sure that the "back" button confuses more than helps.
What i would like to do is to make sure that all the information on
the form gets retained. i'm doing this via asp & session cookies.
Session cookies are not reliable. Besides, to make your site legal in the
EU, you would need to have a description of the use of cookies on it, and
this means extra work. (It's hard to describe the use in a manner that is
legally acceptable _and_ understandable _and_ does not make people
unnecessarily nervous.)

Using hidden fields is probably a better way. Make the script that
generates the first form generate and include a session id like
<input type="hidden" name="session" value="1389472576148">
and make further processing copy the field to new forms generated.
My issue is that if the user clicks on the Back button, i would like
the information to be stored as well.


You haven't specified what the "Back button" is, and does. And why should
the information be stored if the user wants to go _back_?

You could use different name attributes, or different value attributes,
or both, in the buttons, just as the FAQ says, in order to distinguish
between them in the form handler. But this doesn't work reliably on
current browsers if there are text input fields in the form, since
browsers may treat Enter in a text input field as a request to submit the
form _as if_ one of the buttons had been used - and browsers may differ
in interpreting which of the buttons should be simulated.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #3
On Sun, 6 Jun 2004, Jukka K. Korpela wrote:
Session cookies are not reliable. Besides, to make your site legal in the
EU, you would need to have a description of the use of cookies on it,


A couple of commercial sites I've found so far which tried to do that,
would not allow me to read the cookie policy until after I'd accepted
a cookie. Some mistake, surely?

(Sorry, I don't have URLs - I quickly left their site and forgot
them).

Jul 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: KK | last post by:
Windows Forms Inheritance, Incomplete? I was playing around with Windows Forms and found out this Forms Inheritance feature. The moment I saw that, I felt this can be used effectively if the...
2
by: KK | last post by:
** Posting it here cause after couple of days no body responded.** I was playing around with Windows Forms and found out this Forms Inheritance feature. The moment I saw that, I felt this can...
9
by: Terrance | last post by:
Good Afternoon: I was hoping if someone could share some light on a problem that I'm facing. When I create a Visual Basic.Net program and I use the XP style for my Window Forms and buttons; if I...
2
by: Greg Bacchus | last post by:
Hi, I'm getting an exception that really has me stumped. It's sporadic at best, it's only happened a handful of times. This particular time it happened when the user pressed 'Alt-S' to save the...
6
by: MX1 | last post by:
Hi, I've created a series of navigation buttons to be used as a standard across many forms in an Access DB. Does anyone know an easy way to cut and paste these navigation buttons into each new...
6
by: Patrick Coghlan | last post by:
I want to create about 4 forms with the same dimensions and background colours, similar to the forms one has to traverse when installing various software packages. I'm using Visual Studio and...
3
by: Jason | last post by:
Hi all This may seems like an od subject. I would like to know if you can apply some sort of "stylesheet" to winforms? like in ASP.NET you can define .css files to determine your look and feel...
8
by: TJS | last post by:
what are folks doing to get around limitation of one server form per page ?
4
by: robert.waters | last post by:
Hello, I have a main form that is maximized when my application loads; this main form contains links to all other forms. I've had to specify the Popup property of these other forms, so that...
6
by: Zetten | last post by:
This is going to be a long one, but hopefully that will make it easier to understand. I know I don't like posts with too little detail when I'm searching for help. I am creating a form with which...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.