A
Al Jones
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 ))
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 ))