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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

keeping textbox values on previous pages

Status
Not open for further replies.

xenomage

Programmer
Jun 27, 2001
98
SG
Hi all,

has this problem.

i have a page that does a form submit and after submiting, i want to give the option to the user to click on back which i will use "javascript:history.back();" to get back to the previous page. Here comes the problem, i want the browser to retain the values previously enter in the textboxes. any ideas??

my page header contains the following lines.

Response.Buffer = TRUE
Response.expires = 10
Response.cacheControl = "no-cache"

any help is welcome and appreciated. THANKS!!!
 
use a session variable
Session("YourVar") = TextboxName

I'm a VBScript guy so I don't know the syntax for Java.
But here is VBScript code
<%
session(&quot;Invoice&quot;) = LastInvoiceNum
' or passing a session back to a Database field
' open your database here
fp_rs2(&quot;InvoiceNum&quot;)= session(&quot;Invoice&quot;)
%>

This will keep data in a variable as long as the person remains on your site.
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Thanks alot DougP!!!

but i really am looking for a less painless way to to it.
Hoping that there is a way to ask the browser to remember the value by default..Thanks anyway..
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top