943,542 Members | Top Members by Rank

Ad:
  • ColdFusion Discussion Thread
  • Marked Solved
  • Views: 1407
  • ColdFusion RSS
Jan 7th, 2009
0

session level variables

Expand Post »
hi,
I am new to Cold fusion...
I have defined a session level variable in one page1.cfm as follows
<cfset session.testing = "test">
and when I am trying to access it on another page page2.cfm (browser window is not closed meanwhile) it gives an error that "testing" is undefined at page2.cfm. Can someone plz explain why is that so... n help me how can i do this... as i need to access testing on page2.cfm...

thnx in advance
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
thesaintbug is offline Offline
4 posts
since Jan 2009
Jan 7th, 2009
0

Re: session level variables

Hi,

To enable session variables on your pages you need to define the following at the top of each page:

coldfusion Syntax (Toggle Plain Text)
  1. <cfapplication name="Your application Name"
  2. sessionmanagement="Yes"
  3. sessiontimeout=#CreateTimeSpan(0,0,45,0)#>

You should then be able to access your session variables that you define.

Jedimatt
Last edited by peter_budo; Jan 8th, 2009 at 9:38 am. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks) and [icode] (inline code) tags.
Reputation Points: 10
Solved Threads: 1
Newbie Poster
jedimatt is offline Offline
20 posts
since Jan 2009
Jan 9th, 2009
0

Re: session level variables

ok... thanku so much... It really helped me
now I am able to do what i was wanting to do...
thnx
Reputation Points: 10
Solved Threads: 0
Newbie Poster
thesaintbug is offline Offline
4 posts
since Jan 2009

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ColdFusion Forum Timeline: stop page refreshing
Next Thread in ColdFusion Forum Timeline: Spellcheck and CFExecute





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC