473,395 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

dynamic form - session varr get reset WHY?

1
Hi,

I'm getting creazy with this problem and I hope somebody can give me the reason why it's going wrong or even better, the solution.

I'm having a form what is generated dynamic.The names of the formfields are groups with the same number so the stick together and I can make collections by deviding them with there comma's.

Wat I want to do is to set a session var in the dropdowns, or other formfields to make it more easy for the user to fill in more than one time (day).

I did a trick to set the sessionName equal to the dynamic name of the field otherwise they would not combine. that go's ok.

Now where the problem starts.. if i'm not posting the form but go the the next day or just refresh the page the session varrs are empty (!?) Here is the part of code...I hope it's clear enough to get the picture..

Start>>>>>>>>>>>>
<% if flagSubs = "1" then %>



<!-- begin table for extra taken -->
<table width="100%" border="0" cellpadding="0">
<tr>
<%


if MultitaskCount => "1" then
multitasks = "on"
dim zzz
For zzz = 1 To MultitaskCount

' response.write multitasks

%>
<td><select name="naam<%=radioCount%>">
<%

SubAfdeling_rs.movefirst()
Do While Not SubAfdeling_rs.EOF OR SubAfdeling_rs.BOF %>
<option value="<%= trim(SubAfdeling_rs.Fields ("sub_afd")) %>"><%= SubAfdeling_rs.Fields ("sub_afd") %></option>
<% SubAfdeling_rs.MoveNext()
loop %>
<option value="<% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then

if request.form("naam" & radioCount & "").Item((zzz * 2) + 2) <> "" then

aaa = """"& request.form("naam" & radioCount & "").Item((zzz * 2) + 2) & """"

session(aaa) = request.form("naam" & radioCount & "").Item((zzz * 2) + 2)


end if
end if
response.write session(aaa) %> " selected><%= session(aaa) %></option>
</select>
</td>
<td class="summery">
<select name="naam<%=radioCount%>" class="multi">
<option value="Aanwezig">Aanwezig</option>
<option value="Back-up">Back-up</option>
<option value="<% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
response.write request.form("naam" & radioCount & "").Item((zzz * 2) + 3)
end if %>" selected><% If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
response.write request.form("naam" & radioCount & "").Item((zzz * 2) + 3)
end if %></option>
</select>

</td>

<% Next 'zz
end if %>


</tr>
</table>

So my question is why session(aaa) exist and has a value on a post..but when i want to collect his with a refresh of the page or somewhere treu the app the name of the session is lost because it's defined by a normal var..

How can I preserve the sessionName

Regards..
Oct 10 '06 #1
1 2061
scripto
143 100+
Do a simple test on a new web page - do you loose the session variable(s)? if the answer is yes, then you have to turn cookies on in IE. Try that first.
Oct 10 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Ken | last post by:
How can I reset the initial form variables that are set with session statements when clicking on a button? I tried this but the function was not called: <?PHP function reset_form($none) {...
9
by: Brian Burgess | last post by:
Hi all, Anyone know of any issues with setting the value of a Session object to the value of a submitted form item via 'Session("mySessionObj")=Request.Form("myFrmElem")' ? In my case the...
4
by: pizzy | last post by:
INTRO: I tried to clean it up for easy reading. I hope I didn't make any mistakes. PROBLEM: WOW, this is some crazy sh!t. I can't get my checkbox (see "TAGSELECTED") to print my textboxes (see...
7
by: pizzy | last post by:
PROBLEM: I CAN'T GET THE LAST RESUTS TO WORK CORRECTLY. I WOULD PROVIDE THE CODE (AND WILL IF REQUESTED). BUT IN MY OWN WORDS I AM TRYING TO HAVE THE FIRST FORM DYNAMICALLY CREATE INPUT BOXES...
0
by: Martin | last post by:
Hi. I had a very frustrating afternoon and evening but I have got it all under control now so all of a sudden I am in a good mood. I want to share some insights on output caching with you lot. ...
10
by: jaxent | last post by:
Does anyone know why IE gives the error "'document.myForm.dummy' is null or not an object" on the following page? Firefox does what I expect, creates a text box and writes "hello" in it. <html>...
17
by: ezb | last post by:
I have two slight problems I simply cant find an answer to anywhere, the first, only small. I have my database printing out items from a database into a select box, this is giving me blank options...
3
by: creative1 | last post by:
Here is how you create a complex data report that involves parent and child commands and you can update information at runtime. Its pretty straight forward to work with simple queries; however,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.