<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

New Topic/Question
Reply



MultiQuote




|