Passing Data with Hidden Fields

R

Ryann

Hello.

I am creating a form that has 5 steps/pages. Each page contains about
20 fields. But I don't want to write them until they submit on the
last page. I figured out that I can use hidden fields to carry the
data from the previous forms forward. If should bascially work like
this:

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6
20 Fields 20 Fields 20 Fields 20 Fields 20 Fields 100 Hidden
20 Hidden 40 Hidden 60 Hidden 80 Hidden Write to DB

But the problem I am having is when I submit page 4 page 5 won't load.
No error, it just won'tload. It seems to be overburdened. Is there a
max on the number of fields it can pass? Is there a better way to go
about doing this that someone can suggest? Or a suggestion that
someone can make to fix this problem?

Thanks in advance.
 
D

Dan Brussee

Hello.

I am creating a form that has 5 steps/pages. Each page contains about
20 fields. But I don't want to write them until they submit on the
last page. I figured out that I can use hidden fields to carry the
data from the previous forms forward. If should bascially work like
this:

Page 1 Page 2 Page 3 Page 4 Page 5 Page 6
20 Fields 20 Fields 20 Fields 20 Fields 20 Fields 100 Hidden
20 Hidden 40 Hidden 60 Hidden 80 Hidden Write to DB

But the problem I am having is when I submit page 4 page 5 won't load.
No error, it just won'tload. It seems to be overburdened. Is there a
max on the number of fields it can pass? Is there a better way to go
about doing this that someone can suggest? Or a suggestion that
someone can make to fix this problem?

Thanks in advance.

If it is convenient, you could build up one hidden variable for the
entire collection of 2 fields with a seperator. Then you can use split
method to get the information back..

Page 1
P1ITM1
P2ITM2
P3ITM3

Page 2
(hidden) P1 = ITM1 + "|" + ITM2 "|" + ITM3...
P2ITM1
P2ITM2
....
 
B

Bhaskardeep Khaund

Hi,

Alternatively you can write the data into a temporary text file and append it as you go on through the form. At the last form read all the values along with the vales of the last form and put it into the database. Just make a format for the text file so when you pick-up the data it is easier for you.

Regards,
Bhaskardeep Khaund
 
R

Ryann

I have a form that passes hidden fields across 5 pages before writing
them to the DB on page 6. I thought maybe I was overburdening it in
some way by passing 100 hidden fields. When I originally posted this
problem I was working at a workstation with IE 6.0 SP1 installed. The
application hangs when loading some forms.

I worked on it from another location where I had IE 5.5 installed and
I can complete the forms all the way to step6.asp and write the the
database. Here is an outline of the behavior:

Windows XP - IE 6.0 SP1 : Hangs on Step5.asp
Windows XP - IE 6.0 SP1 (alternate location): Hung on Step3.asp
(yesterday) Hangs on Step5.asp (Today)
Windows 98 - IE 6.0 SP1: Hangs on Step5.asp
Windows 2000 - IE 5.5: Can complete all forms
Windows NT 4.0 - IE 5.0: Can complete all forms

Also if I load the page directly using the path instead of opening it
from the form submit on step4.asp the page loads corectly.

If anyone has encountered these problems or has some idea on how to go
about optimizing my code to avoid them I would appreciate feedback.

Thank you.

******************************************************************************
 
S

Scott

I have encountered this in two situations:

When using popups and when dealing with multiple pages. To resolve the
situation I changed the following:

Request("field") to Request.QueryString("field")

and when parsing the info to be passed to the next page I changed:

"page.asp?field=" & strVal to "page.asp?field=" &
Server.URLEncode(strVal)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top