Session problems
I'm having a problem with my Application.cfm and session variables.
I have a diary / jobs list page and I'm using session variables to hold most of the variables as the screen updates between different views.
Application.cfm:
<cfapplication
name="diary"
setdomaincookies="yes"
clientmanagement="no"
sessionmanagement="yes"
setclientcookies="yes"
sessiontimeout="#CreateTimeSpan(0, 1, 0, 0)#"
>
<cfif not isDefined('session.diary')><cfset session.diary = "daily"></cfif>
<cfif not isDefined('session.showNotes)><cfset session.showNotes= "N"></cfif>
<cfif IsDefined("form.diary")> <cfset session.diary = "#form.diary#"> </cfif>
<cfif IsDefined("form.showNotes")> <cfset session.showNotes= "#form.showNotes#"> </cfif>
The problem:
I have links on the pages for different options,
Current state: Daily Diary, hide notes
Click on "pending" diary
<input name=diary value=pending>
Current state: pending diary, hide notes (from session.ShowNotes)
Click on "Show NOtes"
<input name=showNotes value=Y>
Current state: daily diary, show notes
The last state should be pending diary, show notes but the session variables seem to have been forgotten and reverted to the default.
What have I missed?
