472,952 Members | 2,180 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

session variable - malfunction??

This is a repost form the vbscript newgroup - if this isn't the appropriate
group would you point me toward one that is.
Basically, I seem to be losing session data part way though preparing an
email from (possibly) three seperate forms.

the following code is the end of a routine which stashes data from the first
form
off to session variables and then redirects itself to the proper form /
procedure depending upon the state of two checkboxes. It work properly as
it stands.

Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto is schecked
this infact contains 'checkbox' ???
Response.Redirect("auto.asp") ' it appears
to since this works right
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if

however, I get to the following code where I'm preparing the email to the
office:

Body = Body & "They have indicated interest in the following coverage:" &
vbcrlf
' the next two lines are displays so I can see what's really in the session
variables .... not!
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]" &
vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" & vbcrlf

if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & " Tenant
coverage" & vbcrlf

the out put from this looks like:
They have indicated interest in the following coverage:
Session(svcbHomeOwner) []
Session(svcbAuto) []

Notice nothing between the brackets which would seem to indicate they are
empty or non-literal - after I compared them to the literal 'checkbox'
above. How should I really be handling this?? What is the default value
returned by a checked / unchecked checkbox (using dreamweaver, btw) the
'value' clause says 'checkbox' and I've been operating under the assumption
that if the box is checked it will return that value, if unchecked it will
return a null <???>.

Final comment, the timing factor for a session variable <default of 20
minutes ??> should not be a factor as I filled out the two pages I chose in
less than 10 minutes by thee computer clock.

Comments / suggestions ..... please

(( AL ))

Jul 19 '05 #1
6 2314
http://www.aspfaq.com/2157

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Al Jones" <al*****@yahoo.com> wrote in message
news:u7**************@TK2MSFTNGP14.phx.gbl...
This is a repost form the vbscript newgroup - if this isn't the appropriate group would you point me toward one that is.
Basically, I seem to be losing session data part way though preparing an
email from (possibly) three seperate forms.

the following code is the end of a routine which stashes data from the first form
off to session variables and then redirects itself to the proper form /
procedure depending upon the state of two checkboxes. It work properly as
it stands.

Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto is schecked this infact contains 'checkbox' ???
Response.Redirect("auto.asp") ' it appears to since this works right
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if

however, I get to the following code where I'm preparing the email to the
office:

Body = Body & "They have indicated interest in the following coverage:" &
vbcrlf
' the next two lines are displays so I can see what's really in the session variables .... not!
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]" & vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" & vbcrlf

if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & " Tenant coverage" & vbcrlf

the out put from this looks like:
They have indicated interest in the following coverage:
Session(svcbHomeOwner) []
Session(svcbAuto) []

Notice nothing between the brackets which would seem to indicate they are
empty or non-literal - after I compared them to the literal 'checkbox'
above. How should I really be handling this?? What is the default value
returned by a checked / unchecked checkbox (using dreamweaver, btw) the
'value' clause says 'checkbox' and I've been operating under the assumption that if the box is checked it will return that value, if unchecked it will
return a null <???>.

Final comment, the timing factor for a session variable <default of 20
minutes ??> should not be a factor as I filled out the two pages I chose in less than 10 minutes by thee computer clock.

Comments / suggestions ..... please

(( AL ))

Jul 19 '05 #2
Been ther - I can't see anthing there that applies. If all the variables
before were to have gone away I'd understand, but it seems to be something
I'm doing with the checkboxes ....

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
http://www.aspfaq.com/2157

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Al Jones" <al*****@yahoo.com> wrote in message
news:u7**************@TK2MSFTNGP14.phx.gbl...
This is a repost form the vbscript newgroup - if this isn't the

appropriate
group would you point me toward one that is.
Basically, I seem to be losing session data part way though preparing an
email from (possibly) three seperate forms.

the following code is the end of a routine which stashes data from the

first
form
off to session variables and then redirects itself to the proper form /
procedure depending upon the state of two checkboxes. It work properly
as
it stands.

Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto is

schecked
this infact contains 'checkbox' ???
Response.Redirect("auto.asp") ' it

appears
to since this works right
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if

however, I get to the following code where I'm preparing the email to the
office:

Body = Body & "They have indicated interest in the following coverage:" &
vbcrlf
' the next two lines are displays so I can see what's really in the

session
variables .... not!
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]"

&
vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" & vbcrlf

if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & "

Tenant
coverage" & vbcrlf

the out put from this looks like:
They have indicated interest in the following coverage:
Session(svcbHomeOwner) []
Session(svcbAuto) []

Notice nothing between the brackets which would seem to indicate they are
empty or non-literal - after I compared them to the literal 'checkbox'
above. How should I really be handling this?? What is the default value
returned by a checked / unchecked checkbox (using dreamweaver, btw) the
'value' clause says 'checkbox' and I've been operating under the

assumption
that if the box is checked it will return that value, if unchecked it
will
return a null <???>.

Final comment, the timing factor for a session variable <default of 20
minutes ??> should not be a factor as I filled out the two pages I chose

in
less than 10 minutes by thee computer clock.

Comments / suggestions ..... please

(( AL ))


Jul 19 '05 #3
Where do you set those sessions? they arent shown in the code you supplied
"Al Jones" <al*****@yahoo.com> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
Been ther - I can't see anthing there that applies. If all the variables
before were to have gone away I'd understand, but it seems to be something
I'm doing with the checkboxes ....

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
http://www.aspfaq.com/2157

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Al Jones" <al*****@yahoo.com> wrote in message
news:u7**************@TK2MSFTNGP14.phx.gbl...
This is a repost form the vbscript newgroup - if this isn't the

appropriate
group would you point me toward one that is.
Basically, I seem to be losing session data part way though preparing an email from (possibly) three seperate forms.

the following code is the end of a routine which stashes data from the

first
form
off to session variables and then redirects itself to the proper form /
procedure depending upon the state of two checkboxes. It work properly
as
it stands.

Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto is

schecked
this infact contains 'checkbox' ???
Response.Redirect("auto.asp") ' it

appears
to since this works right
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if

however, I get to the following code where I'm preparing the email to the office:

Body = Body & "They have indicated interest in the following coverage:" & vbcrlf
' the next two lines are displays so I can see what's really in the

session
variables .... not!
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]"
&
vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" &
vbcrlf
if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & "

Tenant
coverage" & vbcrlf

the out put from this looks like:
They have indicated interest in the following coverage:
Session(svcbHomeOwner) []
Session(svcbAuto) []

Notice nothing between the brackets which would seem to indicate they are empty or non-literal - after I compared them to the literal 'checkbox'
above. How should I really be handling this?? What is the default value returned by a checked / unchecked checkbox (using dreamweaver, btw) the
'value' clause says 'checkbox' and I've been operating under the

assumption
that if the box is checked it will return that value, if unchecked it
will
return a null <???>.

Final comment, the timing factor for a session variable <default of 20
minutes ??> should not be a factor as I filled out the two pages I

chose in
less than 10 minutes by thee computer clock.

Comments / suggestions ..... please

(( AL ))



Jul 19 '05 #4
This is a three part form -- requesting information for an insurance policy.
The first form is filled out and I 'stash' off the following variables as
session variables. Then depending on the selection we may go to one or both
of the other forms.
This part of the code works without a hitch.
Session("svPersonMarital") = Request.Form("selMarital")
Session("svPersonHomeOwner") = Request.Form("sleHomeOwner")
Session("svPersoncbAuto") = Request.Form("cbAuto") <<===== Auto
Policy Check Box
Session("svPersoncbTenanct") = Request.Form("cbTenants")
Session("svPersoncbHomeOwner") = Request.Form("cbHomeOwner") <<======
Homeowner Checkbox
Session("svPersoncbValuable") = Request.Form("cbValuable")
Session("svPersoncbUmbrella") = Request.Form("cbUmbrella")
Session("svPersoncbFineArts") = Request.Form("cbFineArts")
Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

' If they;'re interestind in Auto Policy we have fill out this form first
and I stash the data off as above ..... then we may got to one of the other
form - or we mail go directly to the mailer

if (Session("svPersoncbAuto") = "checkbox" ) then
Response.Redirect("auto.asp")
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if
However, and it doesn't matter whether they've filled out either of the
other two forms, when I get to this code, the variables seem to contain
nothing ..... as indicated by the two debug lines I've 'printed'.

Body = Body & "They have indicated interest in the following coverage:" &
vbcrlf
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]" &
vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" & vbcrlf

if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & " Tenant
coverage" & vbcrlf
if Session("svcbValuable") = "checkbox" then Body = Body & "
Valuables coverage" & vbcrlf
if Session("svcbUmbrella") = "checkbox" then Body = Body & "
Umbrella coverage" & vbcrlf

I'm at a loss. Timeout is not a function, I'm running it from my machine
which *does* have cookies enabled. Some of the data is there and some of it
appear to not be there, which indicates to me that I don't know what I'm
looking at / for..... suggestions???
"dave" <no**@invalid.com> wrote in message
news:eT**************@TK2MSFTNGP14.phx.gbl...
Where do you set those sessions? they arent shown in the code you supplied
"Al Jones" <al*****@yahoo.com> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
Been ther - I can't see anthing there that applies. If all the variables
before were to have gone away I'd understand, but it seems to be
something
I'm doing with the checkboxes ....

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
> http://www.aspfaq.com/2157
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "Al Jones" <al*****@yahoo.com> wrote in message
> news:u7**************@TK2MSFTNGP14.phx.gbl...
>> This is a repost form the vbscript newgroup - if this isn't the
> appropriate
>> group would you point me toward one that is.
>> Basically, I seem to be losing session data part way though preparing an >> email from (possibly) three seperate forms.
>>
>> the following code is the end of a routine which stashes data from the
> first
>> form
>> off to session variables and then redirects itself to the proper form
>> /
>> procedure depending upon the state of two checkboxes. It work
>> properly
>> as
>> it stands.
>>
>> Session("svPersoncbBoats") = Request.Form("cbBoats")
>> Session("svPersoncbFlood") = Request.Form("cbFlood")
>>
>> if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto is
> schecked
>> this infact contains 'checkbox' ???
>> Response.Redirect("auto.asp") ' it
> appears
>> to since this works right
>> else
>> if (Session("svPersoncbHomeOwner") = "checkbox") then
>> Response.Redirect("HomeOwner.asp")
>> end if
>> Response.Redirect("PersonMail.asp")
>> end if
>>
>> however, I get to the following code where I'm preparing the email to the >> office:
>>
>> Body = Body & "They have indicated interest in the following
>> coverage:" & >> vbcrlf
>> ' the next two lines are displays so I can see what's really in the
> session
>> variables .... not!
>> Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]" > &
>> vbcrlf
>> Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" & vbcrlf >>
>> if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
>> Homeowner coverage (see below)" & vbcrlf
>> if Session("svcbAuto") = "checkbox" then Body = Body & "
>> Automotive (see below)" & vbcrlf
>> if Session("svcbTenants") = "checkbox" then Body = Body & "
> Tenant
>> coverage" & vbcrlf
>>
>> the out put from this looks like:
>> They have indicated interest in the following coverage:
>> Session(svcbHomeOwner) []
>> Session(svcbAuto) []
>>
>> Notice nothing between the brackets which would seem to indicate they are >> empty or non-literal - after I compared them to the literal 'checkbox'
>> above. How should I really be handling this?? What is the default value >> returned by a checked / unchecked checkbox (using dreamweaver, btw)
>> the
>> 'value' clause says 'checkbox' and I've been operating under the
> assumption
>> that if the box is checked it will return that value, if unchecked it
>> will
>> return a null <???>.
>>
>> Final comment, the timing factor for a session variable <default of 20
>> minutes ??> should not be a factor as I filled out the two pages I chose > in
>> less than 10 minutes by thee computer clock.
>>
>> Comments / suggestions ..... please
>>
>> (( AL ))
>>
>>
>>
>
>



Jul 19 '05 #5
You are looking for the value "checkbox" to indicate that an option is
checked. Is that what the checkbox is set to send>
Do this to see what your form is actually sending:

For each i in Request.form
Response.Write i & " = " & Request.Form(i) & "<BR>"
Next

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Al Jones" <al*****@yahoo.com> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
This is a three part form -- requesting information for an insurance policy. The first form is filled out and I 'stash' off the following variables as
session variables. Then depending on the selection we may go to one or both of the other forms.
This part of the code works without a hitch.
Session("svPersonMarital") = Request.Form("selMarital")
Session("svPersonHomeOwner") = Request.Form("sleHomeOwner")
Session("svPersoncbAuto") = Request.Form("cbAuto") <<===== Auto Policy Check Box
Session("svPersoncbTenanct") = Request.Form("cbTenants")
Session("svPersoncbHomeOwner") = Request.Form("cbHomeOwner") <<======
Homeowner Checkbox
Session("svPersoncbValuable") = Request.Form("cbValuable")
Session("svPersoncbUmbrella") = Request.Form("cbUmbrella")
Session("svPersoncbFineArts") = Request.Form("cbFineArts")
Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

' If they;'re interestind in Auto Policy we have fill out this form first
and I stash the data off as above ..... then we may got to one of the other form - or we mail go directly to the mailer

if (Session("svPersoncbAuto") = "checkbox" ) then
Response.Redirect("auto.asp")
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if
However, and it doesn't matter whether they've filled out either of the
other two forms, when I get to this code, the variables seem to contain
nothing ..... as indicated by the two debug lines I've 'printed'.

Body = Body & "They have indicated interest in the following coverage:" &
vbcrlf
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]" & vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" & vbcrlf

if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & " Tenant coverage" & vbcrlf
if Session("svcbValuable") = "checkbox" then Body = Body & "
Valuables coverage" & vbcrlf
if Session("svcbUmbrella") = "checkbox" then Body = Body & "
Umbrella coverage" & vbcrlf

I'm at a loss. Timeout is not a function, I'm running it from my machine
which *does* have cookies enabled. Some of the data is there and some of it appear to not be there, which indicates to me that I don't know what I'm
looking at / for..... suggestions???
"dave" <no**@invalid.com> wrote in message
news:eT**************@TK2MSFTNGP14.phx.gbl...
Where do you set those sessions? they arent shown in the code you supplied

"Al Jones" <al*****@yahoo.com> wrote in message
news:eK**************@TK2MSFTNGP11.phx.gbl...
Been ther - I can't see anthing there that applies. If all the variables before were to have gone away I'd understand, but it seems to be
something
I'm doing with the checkboxes ....

"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:Oo**************@TK2MSFTNGP14.phx.gbl...
> http://www.aspfaq.com/2157
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "Al Jones" <al*****@yahoo.com> wrote in message
> news:u7**************@TK2MSFTNGP14.phx.gbl...
>> This is a repost form the vbscript newgroup - if this isn't the
> appropriate
>> group would you point me toward one that is.
>> Basically, I seem to be losing session data part way though preparing
an
>> email from (possibly) three seperate forms.
>>
>> the following code is the end of a routine which stashes data from
the > first
>> form
>> off to session variables and then redirects itself to the proper form >> /
>> procedure depending upon the state of two checkboxes. It work
>> properly
>> as
>> it stands.
>>
>> Session("svPersoncbBoats") = Request.Form("cbBoats")
>> Session("svPersoncbFlood") = Request.Form("cbFlood")
>>
>> if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto is
> schecked
>> this infact contains 'checkbox' ???
>> Response.Redirect("auto.asp") ' it
> appears
>> to since this works right
>> else
>> if (Session("svPersoncbHomeOwner") = "checkbox") then
>> Response.Redirect("HomeOwner.asp")
>> end if
>> Response.Redirect("PersonMail.asp")
>> end if
>>
>> however, I get to the following code where I'm preparing the email to the
>> office:
>>
>> Body = Body & "They have indicated interest in the following
>> coverage:"

&
>> vbcrlf
>> ' the next two lines are displays so I can see what's really in the
> session
>> variables .... not!
>> Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner")
& "]"
> &
>> vbcrlf
>> Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" &

vbcrlf
>>
>> if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
>> Homeowner coverage (see below)" & vbcrlf
>> if Session("svcbAuto") = "checkbox" then Body = Body & "
>> Automotive (see below)" & vbcrlf
>> if Session("svcbTenants") = "checkbox" then Body = Body & "
> Tenant
>> coverage" & vbcrlf
>>
>> the out put from this looks like:
>> They have indicated interest in the following coverage:
>> Session(svcbHomeOwner) []
>> Session(svcbAuto) []
>>
>> Notice nothing between the brackets which would seem to indicate
they are
>> empty or non-literal - after I compared them to the literal

'checkbox' >> above. How should I really be handling this?? What is the default

value
>> returned by a checked / unchecked checkbox (using dreamweaver, btw)
>> the
>> 'value' clause says 'checkbox' and I've been operating under the
> assumption
>> that if the box is checked it will return that value, if unchecked it >> will
>> return a null <???>.
>>
>> Final comment, the timing factor for a session variable <default of 20 >> minutes ??> should not be a factor as I filled out the two pages I

chose
> in
>> less than 10 minutes by thee computer clock.
>>
>> Comments / suggestions ..... please
>>
>> (( AL ))
>>
>>
>>
>
>



Jul 19 '05 #6
You could also start by print the SessionID. This way you'll make sure that
this is actually a session problem (if it changed). It this is the same it's
more likely that the expected values are not stored (because of a typo in
the name or some other logic error).

Patrice

--

"Al Jones" <al*****@yahoo.com> a écrit dans le message de
news:Oc*************@tk2msftngp13.phx.gbl...
I took your idea and located a script that prints out the session variable
since the problem seems to lie there rather than with the form itself. It
works from another window open at the same time. Dreamweaver default
'value' for a checkbox is, in fact, the literal 'checkbox' (which I'll
change when I'm sure of what I'm doing). I ran your (revised) routine after I finished the first page and saw a couple of (unrelated) typos so fixed
them. Ran all the way through the third form and as each form came up I
check to see what the session variables from the previous form were. After I stash off the second page (it's values are what I expect), or while
processing the third page and stashing its values off something is happening to some of my values (the variables are there but the contents have
changed????). With your tool in hand ((that just did *not* sound right))
I'm going to go looking closer at what I'm doing in that code.

Thanks all for your patience and I'll let you know what I find - and
definitely be back if I don't find ... //al
"Mark Schupp" <ms*****@ielearning.com> wrote in message
news:Ot**************@TK2MSFTNGP11.phx.gbl...
You are looking for the value "checkbox" to indicate that an option is
checked. Is that what the checkbox is set to send>
Do this to see what your form is actually sending:

For each i in Request.form
Response.Write i & " = " & Request.Form(i) & "<BR>"
Next

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Al Jones" <al*****@yahoo.com> wrote in message
news:e9**************@TK2MSFTNGP12.phx.gbl...
This is a three part form -- requesting information for an insurance

policy.
The first form is filled out and I 'stash' off the following variables as session variables. Then depending on the selection we may go to one or

both
of the other forms.
This part of the code works without a hitch.
Session("svPersonMarital") = Request.Form("selMarital")
Session("svPersonHomeOwner") = Request.Form("sleHomeOwner")
Session("svPersoncbAuto") = Request.Form("cbAuto") <<=====

Auto
Policy Check Box
Session("svPersoncbTenanct") = Request.Form("cbTenants")
Session("svPersoncbHomeOwner") = Request.Form("cbHomeOwner") <<======
Homeowner Checkbox
Session("svPersoncbValuable") = Request.Form("cbValuable")
Session("svPersoncbUmbrella") = Request.Form("cbUmbrella")
Session("svPersoncbFineArts") = Request.Form("cbFineArts")
Session("svPersoncbBoats") = Request.Form("cbBoats")
Session("svPersoncbFlood") = Request.Form("cbFlood")

' If they;'re interestind in Auto Policy we have fill out this form
first
and I stash the data off as above ..... then we may got to one of the

other
form - or we mail go directly to the mailer

if (Session("svPersoncbAuto") = "checkbox" ) then
Response.Redirect("auto.asp")
else
if (Session("svPersoncbHomeOwner") = "checkbox") then
Response.Redirect("HomeOwner.asp")
end if
Response.Redirect("PersonMail.asp")
end if
However, and it doesn't matter whether they've filled out either of the
other two forms, when I get to this code, the variables seem to contain
nothing ..... as indicated by the two debug lines I've 'printed'.

Body = Body & "They have indicated interest in the following coverage:" & vbcrlf
Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") & "]"
&
vbcrlf
Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" &
vbcrlf
if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
Homeowner coverage (see below)" & vbcrlf
if Session("svcbAuto") = "checkbox" then Body = Body & "
Automotive (see below)" & vbcrlf
if Session("svcbTenants") = "checkbox" then Body = Body & "

Tenant
coverage" & vbcrlf
if Session("svcbValuable") = "checkbox" then Body = Body & "
Valuables coverage" & vbcrlf
if Session("svcbUmbrella") = "checkbox" then Body = Body & "
Umbrella coverage" & vbcrlf

I'm at a loss. Timeout is not a function, I'm running it from my machine which *does* have cookies enabled. Some of the data is there and some of it
appear to not be there, which indicates to me that I don't know what
I'm looking at / for..... suggestions???
"dave" <no**@invalid.com> wrote in message
news:eT**************@TK2MSFTNGP14.phx.gbl...
> Where do you set those sessions? they arent shown in the code you

supplied
>
>
> "Al Jones" <al*****@yahoo.com> wrote in message
> news:eK**************@TK2MSFTNGP11.phx.gbl...
>> Been ther - I can't see anthing there that applies. If all the

variables
>> before were to have gone away I'd understand, but it seems to be
>> something
>> I'm doing with the checkboxes ....
>>
>> "Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
>> news:Oo**************@TK2MSFTNGP14.phx.gbl...
>> > http://www.aspfaq.com/2157
>> >
>> > --
>> > http://www.aspfaq.com/
>> > (Reverse address to reply.)
>> >
>> >
>> >
>> >
>> > "Al Jones" <al*****@yahoo.com> wrote in message
>> > news:u7**************@TK2MSFTNGP14.phx.gbl...
>> >> This is a repost form the vbscript newgroup - if this isn't the
>> > appropriate
>> >> group would you point me toward one that is.
>> >> Basically, I seem to be losing session data part way though

preparing
> an
>> >> email from (possibly) three seperate forms.
>> >>
>> >> the following code is the end of a routine which stashes data from the
>> > first
>> >> form
>> >> off to session variables and then redirects itself to the proper

form
>> >> /
>> >> procedure depending upon the state of two checkboxes. It work
>> >> properly
>> >> as
>> >> it stands.
>> >>
>> >> Session("svPersoncbBoats") = Request.Form("cbBoats")
>> >> Session("svPersoncbFlood") = Request.Form("cbFlood")
>> >>
>> >> if (Session("svPersoncbAuto") = "checkbox" ) then ' if cbAuto
is >> > schecked
>> >> this infact contains 'checkbox' ???
>> >> Response.Redirect("auto.asp") '
>> >> it
>> > appears
>> >> to since this works right
>> >> else
>> >> if (Session("svPersoncbHomeOwner") = "checkbox") then
>> >> Response.Redirect("HomeOwner.asp")
>> >> end if
>> >> Response.Redirect("PersonMail.asp")
>> >> end if
>> >>
>> >> however, I get to the following code where I'm preparing the email to
> the
>> >> office:
>> >>
>> >> Body = Body & "They have indicated interest in the following
>> >> coverage:"
> &
>> >> vbcrlf
>> >> ' the next two lines are displays so I can see what's really in
the >> > session
>> >> variables .... not!
>> >> Body = Body & "Session(svcbHomeOwner) [" & Session("svcbHomeOwner") &
> "]"
>> > &
>> >> vbcrlf
>> >> Body = Body & "Session(svcbAuto) [" & Session("svcbAuto") & "]" &
> vbcrlf
>> >>
>> >> if Session("svcbHomeOwner") = "checkbox" then Body = Body & "
>> >> Homeowner coverage (see below)" & vbcrlf
>> >> if Session("svcbAuto") = "checkbox" then Body = Body & "
>> >> Automotive (see below)" & vbcrlf
>> >> if Session("svcbTenants") = "checkbox" then Body = Body & "
>> > Tenant
>> >> coverage" & vbcrlf
>> >>
>> >> the out put from this looks like:
>> >> They have indicated interest in the following coverage:
>> >> Session(svcbHomeOwner) []
>> >> Session(svcbAuto) []
>> >>
>> >> Notice nothing between the brackets which would seem to indicate

they
> are
>> >> empty or non-literal - after I compared them to the literal

'checkbox'
>> >> above. How should I really be handling this?? What is the
default > value
>> >> returned by a checked / unchecked checkbox (using dreamweaver, btw) >> >> the
>> >> 'value' clause says 'checkbox' and I've been operating under the
>> > assumption
>> >> that if the box is checked it will return that value, if unchecked it
>> >> will
>> >> return a null <???>.
>> >>
>> >> Final comment, the timing factor for a session variable <default
of 20
>> >> minutes ??> should not be a factor as I filled out the two pages

I > chose
>> > in
>> >> less than 10 minutes by thee computer clock.
>> >>
>> >> Comments / suggestions ..... please
>> >>
>> >> (( AL ))
>> >>
>> >>
>> >>
>> >
>> >
>>
>>
>
>



Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: doltharz | last post by:
Please Help me i'm doing something i though was to be REALLY EASY but it drives me crazy The complete code is at the end of the email (i mean newsgroup article), i always use Option...
9
by: Larry Woods | last post by:
I have a site that works fine for days, then suddenly, I start getting ASP 0115 errors with an indication that session variables IN SEPARATE SESSIONS have disappeared! First, for background...
1
by: Ann Leland | last post by:
I have been using session variables to pass a user name from one ASP page to another inside framesets for 9 months and it stopped working this week. I have made no code changes but there was a...
4
by: VB Programmer | last post by:
If I have a variable I want to share in my application what is the difference between just declaring a variable (Dim strMyVar as String) and using a session variable (Session("strMyVar"))? When...
9
by: Greg Linwood | last post by:
I'm having difficulty understanding Session state in ASP.Net. It's almost embarrassing asking this as I've been using ASP since it was first released & it really shouldn't be this hard to use -...
4
by: T Ralya | last post by:
I am told that ASP.NET controls the session ID and session variables, but that does not fit my symptoms. I am posting here as directed. I'm hoping that someone can at least recommend something to...
3
by: Alan Wang | last post by:
Hi there, Once my application gets complicated and complicated. I found it's really hard to keep track of Session value I am using in my asp.net application. I am just wondering if anyone have...
4
by: Don Miller | last post by:
I am using a Session variable to hold a class object between ASP.NET pages (in VB). In my constructor I check to see if the Session variable exists, and if it doesn't, I create one and populate it...
17
by: Control Freq | last post by:
Hi, Not sure if this is the right NG for this, but, is there a convention for the variable names of a Session variable? I am using .NET 2.0 in C#. I am new to all this .NET stuff, So, any...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...

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.