3 Replies - 3211 Views - Last Post: 25 August 2011 - 07:39 AM Rate Topic: -----

#1 maguscrowley  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 23-August 11

Session not persisting

Posted 24 August 2011 - 01:02 PM

I have two probelms, one minor one not so minor. The minor on is that I cannot check for a previous session. CF is giving me an error on the code

<cfif struckeyexists(SESSION, “CFC” ) > 
<cfset session.CFC = structNew()>
</cfif>



The more important problem though is that I have a session variable that will not persist until the last page. I need it to make a sql update on the last page. The session var is session.CFC and I need session.CFC.eci on the last page. But on the last page session is undefined.

Here is the code for the three pages in the order that they go and the cfc file.



ECIEntryflex.cfm
<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <title>Social Security</title>
  <style type="text/css">
    @import url(https://www.socialsecurity.gov/flexweb/rel_4_1/styles/import.css);
	#box
{
width:220px;
padding:10px;
border:2px solid gray;
margin:0px;
}
  </style>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/yahoo-dom-event.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/selector-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/element-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/container-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/menu-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/button-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/cookie-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/buttonariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/containerariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/menuariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.namespace.js"></script>
  <script type="text/javascript">
  SSA.deployment.setURL("https://www.socialsecurity.gov/flexweb/rel_4_1/");
  </script>	
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.localize.js"></script>    				 
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.page.js"></script>

  </head>


<cfif struckeyexists(SESSION, “CFC” ) > 
<cfset session.CFC = structNew()>
</cfif>




<cfform action="CFCConfirmation.cfm" method="POST">

<body id="fw-info" class="fw-thmNeo">

  <div id="fw-container">

    <div id="fw-header" role="banner"> 
      <a id="fw-skipNav" href="##fw-main">Skip to content</a>
      <div id="fw-websiteIdentity">
        <div id="fw-logo"></div>
        <div id="fw-websiteTitle">
          <h1>Social Security</h1>
          <p id="fw-tagline">The Official Website of the U.S. Social Security Administration</p>
        </div>        
      </div>
      <div id="fw-global">
        <ul id="fw-globalOptions">
          <li id="fw-language"><a href="http://www.socialsecurity.gov/multilanguage/">Other Languages</a></li>
          <li id="fw-textsize"><a href="http://www.socialsecurity.gov/webcontent/textsize.htm">Need Larger Text</a></li>
          <li id="fw-accessibility"><a href="http://www.socialsecurity.gov/webcontent/accessibility.htm">Accessibility Help</a></li>
        </ul>
      </div>
      <div id="fw-help">
        <ul>
          <li><a href="http://ssa-custhelp.ssa.gov/">Have a Question?</a></li>
          <li><a href="http://www.socialsecurity.gov/pgm/reach.htm">Contact Us</a></li>
        </ul>
				<div id="fw-searchBox">
          <form id="fw-search" role="search" name="gs" method="GET" action="http://search2.ba.ssa.gov/search">
            <input id="fw-q" name="q" maxlength="256" class="fw-searchField" placeholder="Search Social Security..." />
            <input class="fw-searchBtn" type="submit" title="Go" value="Go"/>
          </form>
				</div>
      </div>
    </div>
    
    <ul id="fw-nav" role="navigation">
	
		<li><a href="http://personnel.ba.ssa.gov/ope/CFC_Instructional_Info.htm">CFC Website</a></li>
      <li><a href="http://personnel.ba.ssa.gov/ope/default.htm">OPE Home Page</a></li>
      <li title="CFC Home | Selected Tab"><a href="https://www.employeeexpress.gov/DefaultLogin.aspx">Employee Express</a>
      </li>
      <li><a href="http://personnel.ba.ssa.gov/ope/eexpress.htm">OPE Employee Express Page </a></li>

    </ul>

  
		
		<div id="fw-content">
			<div class="yui3-g">                
				
				
				
				
		<div class="yui3-u-1-3">
			<div class="content">
				<form action="CFCfinalflex.cfm" method="post">
					<b>ECI</b>
			     	<input type="text" name="eci" maxlength="20"><br />
					<input type="submit" value="Submit"> <br />
					<a href="CFCformnew.cfm">New account</a></p>
			     </form>
			</div>
		</div>   
            
		<div class="yui3-u-2-3">
			<div class="content">
				<p style="text-align:left">You can find your ECI number on your ...... or by visiting. Please have on hand your charity codes.
				<a href="http://personnel.ba.ssa.gov/ope/CFC_Instructional_Info.htm" >Visit the Office of Personel CFC website</a>
				<img src="500px-US-CombinedFederalCampaign-Logo_svg.png"></img>
			</div>
		</div>   
      		
				
				
				
				
			</div>
            

		</div>  
    </div> <!-- end ##fw-main -->
   
    <div id="fw-footer" role="contentinfo">
      <ul>
        <li><a href="http://www.socialsecurity.gov/privacy.html">Privacy Policy</a></li>
        <li><a href="http://www.socialsecurity.gov/websitepolicies.htm">Website Policies & Other Important Information</a></li>
        <li><a href="http://www.socialsecurity.gov/aboutus/">About Us</a></li>
        <li><a href="http://www.socialsecurity.gov/sitemap.htm">Site Map</a></li>
      </ul>
      <p id="fw-details">[insert Last reviewed or modified date/time]</p>
    </div>  
  
  </div> <!-- body container ends here -->
</cfform>

</body>

</html>




CFCfinalflex.cfm
<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <title>Social Security</title>
  <style type="text/css">
    @import url(https://www.socialsecurity.gov/flexweb/rel_4_1/styles/import.css);

#box
{
width:220px;
padding:10px;
border:2px solid gray;
margin:0px;
}

#alertbox
{
width:220px;
padding:10px;
border:3px solid red;
margin:0px;
text-align:center;
font-size:200%;
}

table
{ 
margin: 1em;
border: 0px
solid #ccc;

} 
td,th 
{ 
border 0px;
text-align:center; 
} 



  </style>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/yahoo-dom-event.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/selector-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/element-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/container-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/menu-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/button-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/cookie-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/buttonariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/containerariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/menuariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.namespace.js"></script>
  <script type="text/javascript">
  SSA.deployment.setURL("https://www.socialsecurity.gov/flexweb/rel_4_1/");
  </script>	
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.localize.js"></script>    				 
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.page.js"></script>

  </head>
  
<cfquery name="cfc_person_contrib" datasource="dbo" result="result">
SELECT eci,lname,fname,mname,civpayamt,totalgift,chkcashamt,CONVERT(varchar(8),date_contrib, 1) AS date1,charity_code1,charity_code2,charity_code3,charity_code4,charity_code5,charity_code1_amt,charity_code2_amt,charity_code3_amt,charity_code4_amt,charity_code5_amt,street,city,state,zip,email,chknumber,cfc_comp
FROM CFC
WHERE eci='#FORM.eci#'
</cfquery>


<cfset session.CFC.eci = #FORM.eci# >
<input type="text" name="eci" value="#FORM.eci#" style="visibility:hidden">
<cfform action="CFCConfirmation.cfm" method="POST">

<cfdump var="#session.CFC#">


<body id="fw-info" class="fw-thmNeo">

  <div id="fw-container">

    <div id="fw-header" role="banner"> 
      <a id="fw-skipNav" href="##fw-main">Skip to content</a>
      <div id="fw-websiteIdentity">
        <div id="fw-logo"></div>
        <div id="fw-websiteTitle">
          <h1>Social Security</h1>
          <p id="fw-tagline">The Official Website of the U.S. Social Security Administration</p>
        </div>        
      </div>
      <div id="fw-global">
        <ul id="fw-globalOptions">
          <li id="fw-language"><a href="http://www.socialsecurity.gov/multilanguage/">Other Languages</a></li>
          <li id="fw-textsize"><a href="http://www.socialsecurity.gov/webcontent/textsize.htm">Need Larger Text</a></li>
          <li id="fw-accessibility"><a href="http://www.socialsecurity.gov/webcontent/accessibility.htm">Accessibility Help</a></li>
        </ul>
      </div>
      <div id="fw-help">
        <ul>
          <li><a href="http://ssa-custhelp.ssa.gov/">Have a Question?</a></li>
          <li><a href="http://www.socialsecurity.gov/pgm/reach.htm">Contact Us</a></li>
        </ul>

      </div>
    </div>
    <ul id="fw-nav" role="navigation">
	
		<li><a href="http://personnel.ba.ssa.gov/ope/CFC_Instructional_Info.htm">CFC Website</a></li>
      <li><a href="http://personnel.ba.ssa.gov/ope/default.htm">OPE Home Page</a></li>
      <li title="CFC Home | Selected Tab"><a href="https://www.employeeexpress.gov/DefaultLogin.aspx">Employee Express</a>
      </li>
      <li><a href="http://personnel.ba.ssa.gov/ope/eexpress.htm">OPE Employee Express Page </a></li>

    </ul>
    
	
    <div id="fw-main" role="main">
  
		<div id="fw-content">
			<div class="yui3-g">
				<cfif result.RecordCount IS 0>


				
				<div class="yui3-u-1-1">          
					<div class="content">
						<div id="alertbox" >
							<p style="color:red"><b>Invalid <br />ECI</b></p>
						</div>
					</div>
				</div>
				<cfelse>
				
				<div class="yui3-u-1-3">          
					<div class="content">
						<cfoutput query="cfc_person_contrib">
							
							<div id="box">#lname# #fname# #mname# <br />
								<b>Address:</b><cfif #street# IS "" AND #city# IS "" AND #state# IS"" AND #zip# IS""> None<cfelse> #street# #city# #state# #zip#</cfif> <br />
								<b>Email:</b><cfif #email# IS""> None<cfelse> #email#</cfif>  <br />
								<b>Component:</b> <cfif #cfc_comp# IS ""> None<cfelse>#cfc_comp#</cfif> <br />
								<b>Date of contribution: </b>
								#DateFormat(date1, "MMMM D, YYYY")#<cfif #date1# IS ""> None<cfelse>#date1#</cfif> <br />
							</div>
						</cfoutput>
					</div>
				</div> 
				
				<div class="yui3-u-1-3">          
					<div class="content">
					<br />
					<br />
					<br />
					<br />
					<br />
					<br />
					<br />
						<table class=table>
							<cfoutput query="cfc_person_contrib">
								<tr>
								
									<th scope="col">
									Charity Code
									</th>
									<th scope="col">
									Amount Donated
									</th>
								</tr>
								<tr>
									<td>
									<div id="charinput"><cfinput type="text" name="charitycode1" maxlength="2" value="#charity_code1#" mask="99" ></div>
									</td>
									

									<td>
									<div id="charinput">$<cfinput type="text" name="charitycode1amt" maxlength="6" value="#charity_code1_amt#" mask="99999" ></div>
									</td>
								</tr>
								<tr>
									<td>
									<div id="charinput"><cfinput type="text" name="charitycode2" maxlength="2" value="#charity_code2#" mask="99"></div>
									</td>
									<td>
									<div id="charinput">$<cfinput type="text" name="charitycode2amt" maxlength="6" value="#charity_code2_amt#" mask="99999"></div>
									</td>
								</tr>
								<tr>
									<td>
									<div id="charinput"><cfinput type="text" name="charitycode3" maxlength="2" value="#charity_code3#" mask="99"></div>
									</td>
									<td>
									<div id="charinput">$<cfinput type="text" name="charitycode3amt" maxlength="6" value="#charity_code3_amt#" mask="99999"></div>
									</td>
								</tr>							<tr>
									<td>
									<div id="charinput"><cfinput type="text" name="charitycode4" maxlength="2" value="#charity_code4#" mask="99"></div>
									</td>
									<td>
									<div id="charinput">$<cfinput type="text" name="charitycode4amt" maxlength="6" value="#charity_code4_amt#" mask="99999"></div>
									</td>
								</tr>
								<tr>
									<td>
									<div id="charinput"><cfinput type="text" name="charitycode5" maxlength="2" value="#charity_code5#" mask="99"></div>
									</td>
									<td>
									<div id="charinput">$<cfinput type="text" name="charitycode5amt" maxlength="6" value="#charity_code5_amt#" mask="99999"></div>
									</td>
								</tr>
							</cfoutput>	
						</table>
					</div>
				</div>

				
			</div> 
			<div class="yui3-u-2-3">
				<div class="content" style="text-align:right">
				<cfoutput query="cfc_person_contrib">
					<b>Biweekly Payroll Deduction   </b> <br />					
						<p><div id="charinput">$<cfinput type="text" name="biweeklypaymentamt" maxlength="6" value="#civpayamt#" validate="numeric" validateat="onsubmit"></div></p> <br />
						<b>Check Amount</b>        <br />
						<p><div id="charinput">$<cfinput type="text" name="checkamount" maxlength="6" value="#chkcashamt#" validate="numeric" validateat="onsubmit"></div></p><br />
						<b>Check Number</b>        <br />
						<p>#chknumber#        </p>        <br />
						<b>Total Gift</b> <br />
						<p>$#totalgift#   </p><br />
						<br />
				</cfoutput>
					<input type="Submit" value="Submit"> 

				
				</div>
			</div>
            </cfif>
</cfform>
		</div>  
    </div> <!-- end ##fw-main -->
   
    <div id="fw-footer" role="contentinfo">
      <ul>
        <li><a href="http://www.socialsecurity.gov/privacy.html">Privacy Policy</a></li>
        <li><a href="http://www.socialsecurity.gov/websitepolicies.htm">Website Policies & Other Important Information</a></li>
        <li><a href="http://www.socialsecurity.gov/aboutus/">About Us</a></li>
        <li><a href="http://www.socialsecurity.gov/sitemap.htm">Site Map</a></li>
      </ul>
      <p id="fw-details">8/18/2011 3:30 by Jeff Coleman</p>
    </div>  
  
  </div> <!-- body container ends here -->


</body>

</html>




CFCConfirmation
<!doctype html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <title>Social Security</title>
  <style type="text/css">
    @import url(https://www.socialsecurity.gov/flexweb/rel_4_1/styles/import.css);
	#box
{
width:220px;
padding:10px;
border:2px solid gray;
margin:0px;
}
  </style>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/yahoo-dom-event.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/selector-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/element-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/container-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/menu-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/button-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/cookie-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/buttonariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/containerariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/yahoo/menuariaplugin-min.js"></script>
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.namespace.js"></script>
  <script type="text/javascript">
  SSA.deployment.setURL("https://www.socialsecurity.gov/flexweb/rel_4_1/");
  </script>	
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.localize.js"></script>    				 
  <script type="text/javascript" src="https://www.socialsecurity.gov/flexweb/rel_4_1/javascript/ssa/ssa.page.js"></script>

  </head>
  
<!---TODO FIND THE FOMULAS FOR CIVPAYAMT TOTALGIFT AND CHKCASHAMT TO BE INPUT INTO THE TABLES--->  

<cfdump var=#FORM#>
<cfdump var=#session#>


<cfquery name="cfc_person_contrib" datasource="dbo" result="result">
UPDATE CFC
SET civpayamt='#FORM.biweeklypaymentamt#',charity_code1='#FORM.charitycode1#',charity_code2='#FORM.charitycode2#',charity_code3='#FORM.charitycode3#',charity_code4='#FORM.charitycode4#',charity_code5='#FORM.charitycode5#',charity_code1_amt='#FORM.charitycode1amt#',charity_code2_amt='#FORM.charitycode2amt#',charity_code3_amt='#FORM.charitycode3amt#',charity_code4_amt='#FORM.charitycode4amt#',charity_code5_amt='#FORM.charitycode5amt#',chkcashamt='#FORM.checkamount#'
WHERE eci='#session.CFC.eci#'
</cfquery>


<cfform action="CFCConfirmation.cfm" method="POST">

<body id="fw-info" class="fw-thmNeo">

  <div id="fw-container">

    <div id="fw-header" role="banner"> 
      <a id="fw-skipNav" href="##fw-main">Skip to content</a>
      <div id="fw-websiteIdentity">
        <div id="fw-logo"></div>
        <div id="fw-websiteTitle">
          <h1>Social Security</h1>
          <p id="fw-tagline">The Official Website of the U.S. Social Security Administration</p>
        </div>        
      </div>
      <div id="fw-global">
        <ul id="fw-globalOptions">
          <li id="fw-language"><a href="http://www.socialsecurity.gov/multilanguage/">Other Languages</a></li>
          <li id="fw-textsize"><a href="http://www.socialsecurity.gov/webcontent/textsize.htm">Need Larger Text</a></li>
          <li id="fw-accessibility"><a href="http://www.socialsecurity.gov/webcontent/accessibility.htm">Accessibility Help</a></li>
        </ul>
      </div>
      <div id="fw-help">
        <ul>
          <li><a href="http://ssa-custhelp.ssa.gov/">Have a Question?</a></li>
          <li><a href="http://www.socialsecurity.gov/pgm/reach.htm">Contact Us</a></li>
        </ul>
				<div id="fw-searchBox">
          <form id="fw-search" role="search" name="gs" method="GET" action="http://search2.ba.ssa.gov/search">
            <input id="fw-q" name="q" maxlength="256" class="fw-searchField" placeholder="Search Social Security..." />
            <input class="fw-searchBtn" type="submit" title="Go" value="Go"/>
          </form>
				</div>
      </div>
    </div>
    
    <ul id="fw-nav" role="navigation">
	
		<li><a href="http://personnel.ba.ssa.gov/ope/CFC_Instructional_Info.htm">CFC Website</a></li>
      <li><a href="http://personnel.ba.ssa.gov/ope/default.htm">OPE Home Page</a></li>
      <li title="CFC Home | Selected Tab"><a href="https://www.employeeexpress.gov/DefaultLogin.aspx">Employee Express</a></li>
      <li><a href="http://personnel.ba.ssa.gov/ope/eexpress.htm">OPE Employee Express Page </a></li>

    </ul>

  
		
		<div id="fw-content">
			<div class="yui3-g">                
				
				
							
				
			</div>
            

		</div>  
    </div> <!-- end ##fw-main -->
   
    <div id="fw-footer" role="contentinfo">
      <ul>
        <li><a href="http://www.socialsecurity.gov/privacy.html">Privacy Policy</a></li>
        <li><a href="http://www.socialsecurity.gov/websitepolicies.htm">Website Policies & Other Important Information</a></li>
        <li><a href="http://www.socialsecurity.gov/aboutus/">About Us</a></li>
        <li><a href="http://www.socialsecurity.gov/sitemap.htm">Site Map</a></li>
      </ul>
      <p id="fw-details">[insert Last reviewed or modified date/time]</p>
    </div>  
  
  </div> <!-- body container ends here -->
</cfform>

</body>

</html>


Session.cfc
<cfcomponent output="false">
<cfset this.name=CFCsite>
<cfset this.sessionManagement="Yes">
<cfset this.datasource="dbo">



</cfcomponent>


Any help would be appreciated. Thank you

Is This A Good Question/Topic? 0
  • +

Replies To: Session not persisting

#2 Craig328  Icon User is offline

  • I make this look good
  • member icon

Reputation: 1943
  • View blog
  • Posts: 3,481
  • Joined: 13-January 08

Re: Session not persisting

Posted 24 August 2011 - 01:37 PM

maguscrowley, for your first issue, do us a favor and tell us what the error message that you're getting says.

For your second issue:
  • you list a code page called session.cfc...where does that get called?
  • "CFC" may very well be a reserved CF word. Try calling your session.CFC struct something else like session.thisUser and see if that works
  • Since all you're doing is copying the value of a form variable into the session variable you're having trouble location...have you considered simply passing the form variable from the first form through to the second as another form variable (since you're using form variables in the same query you're trying to use the session var in)?

Other than that, it's tough posting 500+ lines of relatively uncommented code and ask someone to give much more than vague assistance/insight. For instance, since you're using CFCs you're also likely using Application.cfc wherein all kinds of things could be being done to the session scope that could be affecting your code.

Don't get me wrong: we're happy to help but few people have the time to parse through 500 lines of code across 4 pages to solve your problem for you. If you have an error, it helps to include the explicit text from the error message along with typical error message content like what broke and where (page name/line number).

Good luck!
Was This Post Helpful? 0
  • +
  • -

#3 maguscrowley  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 23-August 11

Re: Session not persisting

Posted 24 August 2011 - 02:02 PM

Sorry for giving you trouble.

This is the error for the first problem:
Invalid construct: Either argument or name is missing.
When using named parameters to a function, each parameter must have a name.
The CFML compiler was processing:

An expression beginning with struckeyexists, on line 37, column 7.This message is usually caused by a problem in the expressions structure.
A cfif tag beginning on line 37, column 2.


The second error didn't give me a line number but simply a "Variable SESSION is undefined"

The reason for CFC is that it stands for Combined Federal Campaign. This is an internal app for federal personel to keep track of yearly donations automatically taken from their paychecks and to change those values in the database. It was my first assignment to try to recreate this. I have a working version but I'm trying to make better and better versions using more and more coldfusion. If I get something good enough this means this will go into production.

But anyway I tried changing CFC and it didn't do anything. The working version transferred the ECI number through invisible text fields submited with the other fields but my mentor wants to see me do it with sessions now.

Also, a good amount of this code and html comes from their flexweb framework. I barely understand the stuff they have in it. I just know enough to use the layouts. None of it came with comments or instructions.
Was This Post Helpful? 0
  • +
  • -

#4 maguscrowley  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 23-August 11

Re: Session not persisting

Posted 25 August 2011 - 07:39 AM

I solved my problems. It was the fact that session was not defined because I needed to name session.cfc application.cfc in order for the line

<cfset this.sessionManagement="Yes">


to have effect. Thank you for your help though.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1