Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ASP - Involved - Automted Submit based on Transaction Success

Status
Not open for further replies.

dougcranston

Technical User
Oct 5, 2001
326
US
Hope someone may have a suggestion or solution to my problem...




Step 1: Initial form Page displayed
|
v
Step 2: User completes Page 1
|
v
Step 3: User submits Page 1 to db process pg
|
======================
Step 4: Transaction Pass => No pop Fail page
|
v
Yes - want to pass PK field and boolean as hidden - No page displayed.
=======================
|
v
========================================
Step 5: Page provides link to enter details, displays table of entered details for editting and a button to submit. Hidden fields used by ASP for formatting input form, and providing the needed info for database.
|
+ Click Add Button. Displays entry page. User inputs and hits submit. Returns to Step 5 page passing HIDDEN PK and Boolean field. User can Click Add insert more detailed records.
|
+ Click Edit Button next to existing Detail records. Allows editting. User inputs and hits submit. Returns to Step 5 page passing HIDDEN PK and Boolean field. User can Click Edit detailed records if necessary.
|
+ Click Delete Button next to existing Detail records. Allows deleting. User inputs and hits submit. Returns to Step 5 page passing HIDDEN PK and Boolean field. User can Click Delete detailed records if necessary.
|
+ Click Submit. Sends to step 6.
========================================
|
v
Step 6: Processing page loops through records and writes to database.
|
v
End


My problem is I can't figure out a way to pass the PK and Boolean fields from Step 4 to Step 5.

Although I know I could set up Session Variables to hold and Pass due to the number of users, this is not feasible due to system resources.

Although I know I could and have tested the use of passing Querystring name=value pairs, once I get to Step 5 I will be looping through the pages using HIDDEN FIELDS. The amount of data due to a Textarea box in Step 5 could exceed the GET limitation.

Although I know I could create page using Response.Writes, with a Submit button to trigger the POST, I want to avoid that to minimize user input and efforts.

I have successfully constructed the ASP to take the data from Step 4 and write it to the DB.

When an error occurs it does pass the user to an error page.

HOWEVER, my attempts to create a form (using Response.Write with hidden fields and calling a script to submit the form have failed. Keep getting DOCUMENT is undefined.

So, does anyone have any suggestions or can point me to a page that may provide a potential approach to solving this problem.

Thanks in advance.

DougCranston



 
could you pass it from page 4's response.redirect through the querystring

ex.
Code:
response.redirect "step5.asp?pk="&varwhatever

not sure what you mean by pk field (if you mean pk is a field in the db, why not open the db in step where id is equal to querystring

Code:
response.redirect "step5.asp?id="&idnum
 
steven290,

Thanks for the quick reply.

Sorry about not clarifying... PK = Primary Key field.. in this case it is a tracking number.

When the details are saved, the tracking # will be stored in the second table as a FK - foriegn key.

The example for the redirect looks very similar to what I came up with but would prefer to pass Hidden fields. As I will be using Hidden fields within the STEP 5 area.

To your point on reading in the data from the database, that is do'able, but from a performance and resource standpoint, everytime the Step 5 select page would be opened it would have to read from the db..

Do appreciate your taking time to provide a solution..

May see how much coding I would need to do to pass via querystring from Step 4 to Step 5... Then once in the Step 5 pass only using Hidden fields and ignore the querystring..

Again thanks and have a great day.

Dougc
 
just remember that storing in hidden field - will do you no good if page 5 does not submit a form
 
Understood.. Was trying to create someway to populate the hidden fields, and assuming transaction processing worked then submit the form using javascript without the user seeing the form.

That is the problem I was attempting to describe and solve.

Have a great day..

Dougc
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top