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

request.form

Status
Not open for further replies.

JohannIcon

Programmer
Sep 3, 2002
440
MT
Hi All,

I have a modifyData.asp page with 3 forms in it, one to modify existing data in the database, another form to Delete a file from the server and another form to upload a file to the server.

All of these are calling the same modifyData.asp and then i am playing with varaibles to do the procs. However my problem is, that when the user modifies the data in the modify data Form, after modifying these data, I am setting the filed to readonly and disabled, and so, when the user for example presses the DELETE button to delete a file from the server, then all the data from the form is lost since the fields have the disable method. How can I store the variables that I get from the first Request.Form action, ie, after pressing the MODIFY button, into a safe place so that I can have access to them later. Is there a way to save them temporarily in memory?

Thanks for your help
 
you can use client side javascript to add them to hidden form fields onSubmitting the form then have them added to session variables for further usage down the road. And or simply add them to session variables. Depends on the compelte scheme of things as you have it but once you get the values into the session variables then they will be retained for later use. I dare to learn more
admin@onpntwebdesigns.com
 
Tanks onpnt, it was a good idea of the session variables, but I used the same recordset I am retreiving the results from and it worked fine

Thanks again
 
Hi onpnt again, I tried to use a recordset but it is not updating the new modified fields, then I tried using session vars but the fields are still cleared and not stored. I am doing the following:-

Date = request.Form("datebox")
Session("CurrentDate") = Date
CurrentDate = (session("CurrentDate"))

then in the form field:-

<%
if var1 = 1 then
%>
<input type=text name=&quot;datebox&quot; value=&quot;<%=CurrentDate%>&quot; disabled readonly size=15>
<%
else
%>
<input type=text name=&quot;datebox&quot; value=&quot;<%response.Write(rsEkuntatt.fields(&quot;ekuntattDate&quot;))%>&quot; size=15>
<%
end if
%>

and var = 1 means that the fields have been modified
 
It has nothing to do with the date cause I have another 3 vars. The problem is that the second time, the field is empty and so request.form is not storing anything
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top