If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > persist values on redirect

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-28-04, 12:56
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
persist values on redirect

I'm trying to accomplish the following. I'm trying to get the values for the table rows that are dynamically created to persist through the redirect.

Referring URL:
http://www.dwayneepps.com/abr_site/fundingrequest.asp

If you click on the "New Transaction" button it will generate a new row for
the user to input information. I call a javascript function when the user
clicks the "New Transaction" button that redirects to another page that
processes some ASP code that builds a new row. I use a loop to create the
table rows by incrementing a session variable everytime the user clicks on
the "New Transaction" button.

Here is the structure of the loop:
<%
Session("url") = 2
Dim x
For x = 0 to Session("TotalRowsB")
%>
<tr>
<td><input name="yr<%=x%>" type="text" id="yr<%=x%>"
value="<%=Session("yr")%>" size="5" maxlength="25"></td>
<td><select name="strategy<%=x%>">
<option selected>-select-</option>
</select></td>
<td><input name="BA<%=x%>" type="text" value="" size="15"></td>
<td><select name="BO<%=x%>">
<option selected>-select-</option>
</select></td>
<td><input name="origBA<%=x%>" type="text" value="10,000,000.00"
size="15" maxlength="100" readonly="true"></td>
<td><input name="IncrDecr<%=x%>" type="text" value=""
size="10"></td>
</tr>
<%
Next
%>

The field names increment by one for every new row that is created. For
example, the field "yr" would be "yr1", "yr2", "yr3" on each pass through
the loop.

Would cookies be the way to go on this? I was looking at the dictionary
object? And sessions? But, I'm lost on the best way to hold the
user's input when a new row is created.

Any help is greatly appreciated. Thanks.
-Dman100-
Reply With Quote
  #2 (permalink)  
Old 11-29-04, 15:34
-Dman100- -Dman100- is offline
Registered User
 
Join Date: Jan 2004
Posts: 124
I finally got it figured out...thanks.
-Dman100-
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On