JJ,

It looks to me like all we're really looking at is a difference in
variable scoping.  Your List thread refers to "RE: Session Variables"
but we're actually talking about form variables.  The scope for a form
variable is persistent only from page1 to page2 but can't be passed to
page3 unless it's values are reassigned to new form variables on page2
and then passed to page3 or the form variables from page1 are assigned
to session variables on page2. If you only need them for page3 then use
the FORM scope and when you leave page3 your variables disappear: 

<! === <PAGE1> --- >
<form name="formA" action="PAGE2.cfm" method="POST">
  <input type="text" name="FirstName"> - First Name<br>
  <input type="text" name="LastName">  - Last Name <br>
  <input type="submit" name="Submit" value="Submit">
  <input type="hidden" name="Person_id" value="10">
  <input type="hidden" name="School_id" value="100">
</form>

<! === <PAGE2> Reassign and display the variables--- >
<form name="formB" action="PAGE3.cfm" method="POST">
  <input type="hidden" name="FirstName" value="#FORM.FirstName#">
        #FORM.FirstName#<br>
  <input type="hidden" name="LastName" value="#FORM.LastName#">
        #FORM.LastName#<br>
  <input type="submit" name="Submit" value="Submit">
  <input type="hidden" name="Person_id" value="10">
  <input type="hidden" name="School_id" value="100">
</form>


<! === <PAGE3> Use the FORM variables --- >
  
  First Name: #FORM.FirstName#<br>
   Last Name: #FORM.LastName#<br>
   Person ID: #FORM.Person_id#<br>
   School_ID: #FORM.School_id#

</form>

If you use the session scope on page2: 
<cfset session.variableName = #Form.VariableName#>

it will be persistent until either the value is changed/reassigned or
until the session timeout period has expired (normal default is about
20-minutes) and you can use the variable #session.variableName# on any
page during the "SESSION" scope.

Robert Gunn

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On
Behalf Of Dan Blackman
Sent: Monday, July 08, 2002 1:28 PM
To: [EMAIL PROTECTED]
Subject: RE: Session Variables

Simply Change the FormA scope variables to the form scope in Page_B.cfm.
THere is no scope named formA...No matter how hard you might try!

HTH

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
Behalf Of Javier Flores
Sent: Monday, July 08, 2002 1:23 PM
To: [EMAIL PROTECTED]
Subject: Re: Session Variables


Ok,

But I�m currently doing in that way... and it does not work...
PAGE_A.cfm
-------------------------------------------------------
<form name="formA" action="PAGE_B.cfm" method="POST">
  <input type="text" name="FirsName"> - First Name<br>
  <input type="text" name="LastName">  - Last Name <br>
  <input type="submit" name="Submit" value="Submit">
  <input type="hidden" name="Person_id" value="10">
  <input type="hidden" name="School_id" value="100">
</form>

-------------------------------------------------------
PAGE_B.cfm
<form name="formB" action="PAGE_C.cfm" method="POST">
  #formA.FirstName# - First Name<br>
  #formA.LastName#  - Last Name <br>
  #formA.Person_id#  - Last Name <br>
  #formA.School_id#  - Last Name <br>
  <input type="submit" name="Submit" value="Submit">
</form>

What do I need to change? add?

JJ






----- Original Message -----
From: "KNOWLTON, JUSTIN J (SWBT)" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 08, 2002 1:41 PM
Subject: RE: Session Variables


> I've always just used the "<input type="hidden" name="LastName"
> value="#form.LastName#">" method.
>
> On the first form, you ask for the last name. On the second form, you
hide
> the value of "#form.lastname#" since it is a variable from the
previous
> page. Finally, when you are actually posting the form, just post the
> variable "#form.lastname#", etc.
>
> I wouldn't use session variables on this type of thing but that is
just
me.
>
> -----Original Message-----
> From: Javier Flores [mailto:[EMAIL PROTECTED]]
> Sent: Monday, July 08, 2002 12:26 PM
> To: [EMAIL PROTECTED]
> Subject: Session Variables
>
>
> Hi everyone!
>
> I triying to create a 3 form using 3 steps... Form 1 (step 1), Form 2
(step
> 2) and Form 3 (step 3)...
> -------------------------------------------
> In the 1st form... I request for
> Name
> Last Name
> ID
> -------------------------------------------
> In the 2nd form... I request for
> [hidden] Name
> [hidden] Last Name
> [hidden] ID
> School
> Birth Day
> -------------------------------------------
> In the 3th form... I request for
> [hidden] Name
> [hidden] LastName
> [hidden] ID
> [hidden] School
> [hidden] Birth Day
> Comments
>
> And in the 4th web page... I just want to show ALL the Values to
insert it
> in a DB...
>
> I dont want to pass the values for the URL... I put it in the
following
way
> and does not appears the values...
> #session.LastName#
> and
> <input type="hidden" name="LastName" value="#LastName#">
>
> What do I have to do? What is the better way to pass this values from
one
> form to another?
>
> Regards,
>
> JJ
>
>
>
------------------------------------------------------------------------
-
> This email server is running an evaluation copy of the MailShield
anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info:
www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>
>
------------------------------------------------------------------------
-
> This email server is running an evaluation copy of the MailShield
anti-
> spam software. Please contact your email administrator if you have any
> questions about this message. MailShield product info:
www.mailshield.com
>
> -----------------------------------------------
> To post, send email to [EMAIL PROTECTED]
> To subscribe / unsubscribe: http://www.dfwcfug.org
>


------------------------------------------------------------------------
-
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info:
www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org


------------------------------------------------------------------------
-
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info:
www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org




-------------------------------------------------------------------------
This email server is running an evaluation copy of the MailShield anti-
spam software. Please contact your email administrator if you have any
questions about this message. MailShield product info: www.mailshield.com

-----------------------------------------------
To post, send email to [EMAIL PROTECTED]
To subscribe / unsubscribe: http://www.dfwcfug.org

Reply via email to