Copy link to clipboard
Copied
I have an application which allows users to submit a benefits form.
Tab 1 shows forms which the logged in user has already submitted.
Tab 2 ("Create new form") contains a blank form. The form is loaded from a separate file, which has the entire form
<cflayoutarea title="Edit/Create New Application" name="tab2" selected="#mytab2#" source="appl_form.cfm">
I'm using cfform, as several of the fields are required, and I want to take advantage of the mask option.
I'm using a couple of different onchange javascript functions on many of the fields; one invokes ColdFusion.Ajax.submitForm to call a CFC calculator function to provide a running total as the user enters numbers, the other looks up some meta information and populates hidden form fields appropriately. All of that is working great.
When the user actually submits the form, I want to reload the entire page, so that the newly submitted data shows up on the list of submitted forms. I'm using the ColdFusion.navigate function for this.
<input id="submit" value="I Agree. Submit My Application." type="submit" onclick="javascript:ColdFusion.navigate('index.cfm',null,mycallBack,myError,'POST','tran_app');">
The problem I''m having is that the form will not submit properly unless I include an "onsubmit" function in the cform tag:
<cfform name="tran_app" id="tran_app" action="index.cfm" method="post" onsubmit="javascript:SubFrm()">
It doesn't actually use the function, in fact it throws a JS error:
Error: SubFrm is not defined
Source File: http://www.inside.dev.nsf.gov/CFIDE/scripts/ajax/package/cfajax.js
The function in question is in the parent page, along with all the other functions that are found.
HOWEVER, other than that thrown JS errror, the page works perfectly -- the data is submitted and the page redraws fine.
I have tried:
removing the onsubmit attribute from cfform
making the onsubmit call the same as the onclick in the submit button
removing everything except the id attibute from cfform
screaming
none of which worked, although the screaming made me feel a bit better.
There may be a sainthood involved for anyone who can help me with this.
Copy link to clipboard
Copied
I forgot, also tried removing the onclick and leaving only the onsubmit, with the navigate tag. This inserts the dat, but then throws a CF error as if the data was being submitted a second time with blank fields.
Copy link to clipboard
Copied
Could u plz paste the entire code
?
Copy link to clipboard
Copied
Hi:
I've uploaded the files.
thanks
Theresa
Copy link to clipboard
Copied
Okay, no uploads.
index.cfm =======================================
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="../../../../../../Templates/template_one_col_cfm.dwt" codeOutsideHTMLIsLocked="false" --><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>Inside NSF: NSF Application for Transit Benefits</title>
<!-- InstanceEndEditable -->
<cfajaximport tags="cfform,cflayout-tab,cftooltip" />
<script type="text/javascript"
language="JavaScript"
src="js/wddx.js"></script>
<cfif (CGI.HTTP_USER_AGENT contains "MSIE")
AND (CGI.HTTP_USER_AGENT contains "Win")>
<script type="text/javascript"
language="JavaScript"
src="js/wddxDesIE.js"></script>
<cfelse>
<script type="text/javascript"
language="JavaScript"
src="js/wddxDes.js"></script>
</cfif>
<!--- <cfparam name="myaction" default="none"> --->
<cfparam name="mytab1" default="Yes">
<cfparam name="mytab2" default="No">
<cfparam name="mytab3" default="No">
<cfparam name="mytab4" default="No">
<cfparam name="admintab" default="Yes">
<cfif (session.myrole EQ "admin")>
<cfset admintab = "No">
<cfif myaction neq "submit">
<cfset mytab1 = "No">
<cfset mytab3 = "Yes">
</cfif>
</cfif>
<cfif myaction eq "submit">
<cftransaction>
<cfinsert datasource="transit" tablename="rqst" tableowner="transit" formfields="addr_city,addr_st,addr_zip_code,smrt_bnft_srl,mnth_vre_cst,mnth_marc_cst,mnth_mta_cst,mnth_van_cst,mnth_oth1_txt,mnth_oth1_cst,mnth_oth2_txt,mnth_oth2_cst,mtro_fare,mtro_stn,daly_mtro_rail_day,daly_mtro_bus_day,daly_mtro_bus_cst,daly_vre_day,daly_vre_cst,daly_marc_day,daly_marc_cst,daly_mta_day,daly_mta_cst,daly_oth1_txt,daly_oth1_day,daly_oth1_cst,daly_oth2_txt,daly_oth2_day,daly_oth2_cst,daly_oth3_txt,daly_oth3_day,daly_oth3_cst,daly_oth4_txt,daly_oth4_day,daly_oth4_cst,cert1,cert2,cert3,cert4,cert5,cert6,cert7,cert8,last_updt_user,lan_id,tot_mnth_cost,tot_dly_cost,rqst_tot,appl_stts,myaction,appl_subm_date">
<cfquery name="getRID" datasource="transit" dbtype="Sybase">
select max(rqst_id) as MID from transit.rqst
where lan_id = '#session.lan_id#'
</cfquery>
<cfset RID = #getRID.MID#>
</cftransaction>
<cfinvoke component="transit" method="sendSubmit"
RID="#RID#" returnvariable="EmailStatus">
</cfif>
<cfif myaction eq "cancel">
<cftransaction>
<cfquery name="update_cancel" datasource="transit" dbtype="Sybase">
update transit.rqst
set appl_exp_date = getdate(),
appl_stts = 'cancelled',
last_updt_tmsp = getdate(),
last_updt_user = '#session.lan_id#'
where rqst_id = #RID#
</cfquery>
</cftransaction>
<cfinvoke component="transit" method="sendCancel"
RID="#RID#" returnvariable="EmailStatus">
</cfif>
<cfinvoke component="transit" method="getUserApps"
UserId="#session.lan_id#" returnvariable="AppList">
<!--- no submitted apps, default to new form --->
<cfif (#AppList.RecordCount# EQ "0") AND (session.myrole NEQ "admin")>
<cfset mytab1 ="No">
<cfset mytab2 ="Yes">
</cfif>
<script type="text/javascript">
myCB = function(resp){
var wddxDes=new WddxDeserializer;
var fData=wddxDes.deserialize(resp);
//alert(resp);
var monthDiv = document.getElementById('monthtot');
var monthDiv2 = document.getElementById('monthtot2');
var dailyDiv = document.getElementById('dailytot');
var dailyDiv2 = document.getElementById('dailytot2');
var combDiv = document.getElementById('combtot');
var monthtot_cert = document.getElementById('monthtot_cert');
var metroRT = document.getElementById('metroRT');
var metroWK = document.getElementById('metroWK');
var metroMN = document.getElementById('metroMN');
var busWK = document.getElementById('busWK');
var busMN = document.getElementById('busMN');
var vreWK = document.getElementById('vreWK');
var vreMN = document.getElementById('vreMN');
var vreWK = document.getElementById('vreWK');
var vreMN = document.getElementById('vreMN');
var marcWK = document.getElementById('marcWK');
var marcMN = document.getElementById('marcMN');
var mtaWK = document.getElementById('mtaWK');
var mtaMN = document.getElementById('mtaMN');
var oth1WK = document.getElementById('oth1WK');
var oth1MN = document.getElementById('oth1MN');
var oth2WK = document.getElementById('oth2WK');
var oth2MN = document.getElementById('oth2MN');
var oth3WK = document.getElementById('oth3WK');
var oth3MN = document.getElementById('oth3MN');
var oth4WK = document.getElementById('oth4WK');
var oth4MN = document.getElementById('oth4MN');
monthDiv.innerHTML = fData.MONTHSUB;
monthDiv2.innerHTML = fData.MONTHSUB;
dailyDiv.innerHTML = fData.DAILYSUB;
dailyDiv2.innerHTML = fData.DAILYSUB;
combDiv.innerHTML = fData.COMBTOTAL;
if ( fData.COMBTOTAL <= 230 ) {
monthtot_cert.innerHTML = fData.COMBTOTAL;
document.getElementById('warn').innerHTML = ""
} else {
monthtot_cert.innerHTML = 230;
document.getElementById('warn').innerHTML = "<br />Your costs exceed the maximum allowable transit benefit of $230."
}
metroRT.innerHTML = fData.METRORT;
metroWK.innerHTML = fData.METROWK;
metroMN.innerHTML = fData.METROMN;
busWK.innerHTML = fData.BUSWK;
busMN.innerHTML = fData.BUSMN;
vreWK.innerHTML = fData.VREWK;
vreMN.innerHTML = fData.VREMN;
marcWK.innerHTML = fData.MARCWK;
marcMN.innerHTML = fData.MARCMN;
mtaWK.innerHTML = fData.MTAWK;
mtaMN.innerHTML = fData.MTAMN;
oth1WK.innerHTML = fData.OTH1WK;
oth1MN.innerHTML = fData.OTH1MN;
oth2WK.innerHTML = fData.OTH2WK;
oth2MN.innerHTML = fData.OTH2MN;
oth3WK.innerHTML = fData.OTH3WK;
oth3MN.innerHTML = fData.OTH3MN;
oth4WK.innerHTML = fData.OTH4WK;
oth4MN.innerHTML = fData.OTH4MN;
if (document.tran_app != null) {
document.tran_app.tot_mnth_cost.value = fData.MONTHSUB;
document.tran_app.tot_dly_cost.value = fData.DAILYSUB;
document.tran_app.rqst_tot.value = fData.COMBTOTAL;
}
}
myError = function(sc,msg){
alert('Error!!! ' +sc +' '+msg);
}
submitFrm = function(){
ColdFusion.Ajax.submitForm('tran_app', 'transit.cfc?method=calculator', myCB, myError);
return true;
}
subFrm = function(){
//ColdFusion.Ajax.submitForm('tran_app', 'transit.cfc?method=calculator', myCB, myError);
return true;
}
setStation = function(stn){
var stn_name = stn;
document.tran_app.mtro_stn.value = stn_name;
//alert(stn_name);
}
mycallBack = function(){
}
ViewWindow = function(RID) {
window.open("view.cfm?RID="+RID, "View", "resizable=1,height=500,width=600,status=1,scrollbars=1")
}
</script>
<meta name="creator" content="pgartner" />
<meta name="creation date" content="04/24/2009" />
<meta name="last reviewed date" content="04/24/2009" />
<meta name="language" content="English" />
<link rel="StyleSheet" type="text/css" href="/css/style.css"/>
<cfinclude template="/ssi/rollover_script.htm">
<!-- InstanceParam name="header_src" type="URL" value="../../../../../../images/headers/oirm_header.gif" --><!-- InstanceParam name="header_alt" type="text" value="Office of Information Resource Management" --><!-- InstanceParam name="supertitle" type="boolean" value="false" --><!-- InstanceParam name="topbutton" type="boolean" value="true" --><!-- InstanceParam name="meta_creator" type="text" value="pgartner" --><!-- InstanceParam name="meta_creation_date" type="text" value="04/24/2009" --><!-- InstanceParam name="meta_last_reviewed_date" type="text" value="04/24/2009" --><!-- InstanceParam name="ftr_webmaster_org" type="text" value="das" --><!-- InstanceParam name="ftr_content_owner" type="text" value="tmclendo" -->
</head>
<a name="top" id="top"></a>
<body class="mainbody" onload="MM_preloadImages('/images/nsf_on.gif','/images/org_on.gif','/images/intserv_on.gif','/images/worklife_on.gif','/images/resources_on.gif')">
<cfinclude template="/ssi/inside-header.htm">
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td><table align="center" border="0" cellpadding="0" cellspacing="0" width="750">
<tbody>
<tr>
<td valign="top" width="750">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tbody>
<tr>
<td colspan="4"><img src="../../../../../../images/headers/oirm_header.gif" alt="Office of Information Resource Management" width="750" height="31" /></td>
</tr>
<tr>
<td rowspan="6" align="left" bgcolor="#9ea4ab" width="1"><img src="/images/x.gif" height="1" width="1"/></td>
<td bgcolor="#95b6ed" height="1" width="748"><img src="/images/x.gif" height="1" width="1"/></td>
<td rowspan="6" align="right" bgcolor="#9ea4ab" width="1"><img src="/images/x.gif" height="1" width="1"/></td>
</tr>
<tr>
<td align="left" bgcolor="#c6dafa" height="12" valign="top"><img src="/images/under_header.gif" align="top" height="12" width="748"/></td>
</tr>
<tr>
<td bgcolor="#95b6ed" height="1"><img src="/images/x.gif" height="1" width="1"/></td>
</tr>
<tr>
<td colspan="2" align="left" valign="middle"><table border="0" cellpadding="0" cellspacing="0" width="97%">
<tbody>
<tr>
<td height="10" valign="top"><img src="/images/x.gif" height="10" width="10"/></td>
<td class="text" height="10"> </td>
</tr>
<tr>
<td valign="top" width="3%"><img src="/images/x.gif" height="1" width="1"/></td>
<td class="text" width="97%" valign="top">
<a name="content" id="content"></a><span class="pageheadline"><!-- InstanceBeginEditable name="title" -->NSF Application for Transit Benefits <!-- InstanceEndEditable --></span>
<!-- InstanceBeginEditable name="body" tabheight="300px" -->
<p><a href="index.cfm?myaction=logout">Log Out</a></p>
<cflayout type="tab" name="mainTab" style="width:840px">
<cflayoutarea title="My Applications" name="tab1" selected="#mytab1#">
<h2>My Applications</h2>
<cfif (myaction eq "submit") or (myaction eq "cancel")>
<cfinclude template="confirm.cfm">
</cfif>
<cfdiv id="cbtext">
</cfdiv>
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top" class="tablehead" id="first_column_description">Date Submitted</td>
<td valign="top" class="tablehead" id="second_column_description">Amount Requested</td>
<td valign="top" class="tablehead" id="third_column_description">Status</td>
<td valign="top" class="tablehead" id="fourth_column_description">Approval Date</td>
<td valign="top" class="tablehead" id="fifth_column_description">Last Updated By </td>
<td valign="top" class="tablehead" id="sixth_column_description"></td>
<td valign="top" class="tablehead" id="seventh_column_description"></td>
</tr>
<cfoutput query="AppList">
<tr>
<td valign="top" class="tabletext">#DateFormat(AppList.appl_subm_date, "mm/dd/yyyy")#</td>
<td valign="top" class="tabletext">#NumberFormat(AppList.rqst_tot,'9999.99')#</td>
<td valign="top" class="tabletext">#AppList.appl_stts#</td>
<td valign="top" class="tabletext">#DateFormat(AppList.appl_aprv_date, "mm/dd/yyyy")#</td>
<td valign="top" class="tabletext">#AppList.last_updt_user#</td>
<td valign="top" class="tabletext">
<a href="javascript:ViewWindow('#AppList.rqst_id#')" >VIEW</a></td>
<td valign="top" class="tabletext"><cfif (#AppList.appl_stts# EQ "verified") OR (#AppList.appl_stts# EQ "Submitted")><form action="index.cfm" method="post" id="cancel_action" name="cancel_action"><input type="hidden" name="RID" value="#AppList.rqst_id#"><input type="hidden" name="myaction" value="cancel"><input type="submit" name="CancelRQ" id="CancelRQ" value="Cancel Request"></form></td>
</cfif>
</tr>
</cfoutput>
</table>
</cflayoutarea>
<cflayoutarea title="Edit/Create New Application" name="tab2" selected="#mytab2#" source="appl_form.cfm" overflow="visible">
<p> </p>
</cflayoutarea>
<!--- hide these from non admin users --->
<cfif (session.myrole EQ "admin")>
<cflayoutarea title="Applications Awaiting Review" name="tab3" selected="#mytab3#" initHide="#admintab#">
<cfinvoke component="transit" method="getPendingApps" returnvariable="PendList">
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top" class="tablehead" id="first_column_descrip">Requestor</td>
<td valign="top" class="tablehead" id="second_column_descrip">Date Submitted</td>
<td valign="top" class="tablehead" id="third_column_descrip">Amount Requested</td>
<td valign="top" class="tablehead" id="fourth_column_descrip">Status</td>
<td valign="top" class="tablehead" id="fifth_column_desrip"></td>
</tr>
<cfoutput query="PendList">
<tr>
<td valign="top" class="tabletext">#lan_id#</td>
<td valign="top" class="tabletext">#DateFormat(appl_subm_date, "mm/dd/yyyy")#</td>
<td valign="top" class="tabletext">#NumberFormat(rqst_tot,'9999.99')#</td>
<td valign="top" class="tabletext">#appl_stts#</td>
<td valign="top" class="tabletext">
<a href="javascript:ViewWindow('#rqst_id#')" >VIEW</a></td>
</tr>
</cfoutput>
</table>
</cflayoutarea>
<cflayoutarea title="Verified Applications" name="tab4" selected="#mytab4#" initHide="#admintab#">
<cfinvoke component="transit" method="getVerifiedApps" returnvariable="VerList">
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top" class="tablehead" id="first_column_desc">Requestor</td>
<td valign="top" class="tablehead" id="second_column_desc">Date Submitted</td>
<td valign="top" class="tablehead" id="third_column_desc">Amount Requested</td>
<td valign="top" class="tablehead" id="fourth_column_desc">Status</td>
<td valign="top" class="tablehead" id="fifth_column_desc">Approval Date</td>
<td valign="top" class="tablehead" id="sixth_column_desc">Approved By</td>
<td valign="top" class="tablehead" id="seventh_column_desc"></td>
</tr>
<cfoutput query="VerList">
<tr>
<td valign="top" class="tabletext">#VerList.lan_id#</td>
<td valign="top" class="tabletext">#DateFormat(VerList.appl_subm_date, "mm/dd/yyyy")#</td>
<td valign="top" class="tabletext">#NumberFormat(VerList.rqst_tot,'9999.99')#</td>
<td valign="top" class="tabletext">#VerList.appl_stts#</td>
<td valign="top" class="tabletext">#DateFormat(appl_aprv_date, "mm/dd/yyyy")#</td>
<td valign="top" class="tabletext">#aprv_lan_id#</td>
<td valign="top" class="tabletext">
<a href="javascript:ViewWindow('#rqst_id#')" >VIEW</a></td>
</tr>
</cfoutput>
</table>
</cflayoutarea>
</cfif>
</cflayout>
<!-- InstanceEndEditable --></td>
</tr>
<tr>
<td> </td>
<td class="text" align="right" valign="top"><a href="#top"><img src="/images/top.gif" alt="Back to Top" width="41" height="25" border="0" /></a></td>
</tr>
</tbody>
</table></td>
</tr>
<tr bgcolor="#9ea4ab">
<td colspan="4" height="1"><img src="/images/x.gif" height="1" width="1"/></td>
</tr>
</tbody>
</table></td>
</tr>
</tbody>
</table><br/></td>
</tr>
</tbody>
</table>
<cfset showLastModified = "true">
<cfset webmasterOrg = "das">
<cfset contentOwner = "tmclendo">
<cfinclude template="/ssi/inside-footer.cfm">
</body>
<!-- InstanceEnd -->
</html>
====================================== index.cfm end
appl_form.cfm ===============================
<p><span class="subhead">Applicant Information</span><br />
<img src="/images/bluefade.jpg" width="457" height="1" vspace="5" /></p>
<cfform name="tran_app" id="tran_app" action="index.cfm" method="post" onsubmit="javascript:SubFrm()">
<!---
onsubmit="javascript:ColdFusion.navigate('index.cfm','cbtext',mycallBack,myError,'POST','tran_app');" --->
<table width="100%" border="0" cellspacing="0" cellpadding="6">
<tr>
<td>Name</td>
<td><cfoutput>#session.frst_name# #session.mid_name# #session.last_name#</cfoutput></td>
</tr>
<!--- <span class="red">*</span> Number</td>
<td><cfinput name="addr_strt_num" type="text" id="addr_strt_num" size="10" required="No" /></td>
</tr>
<tr>
<td> <span class="red">*</span> Street</td>
<td><cfinput name="addr_strt_name" type="text" id="addr_strt_name" size="40" required="No"/></td>
</tr>
<tr>
<td> <span class="red"></span> Apartment</td>
<td><cfinput name="addr_apt_num" type="text" id="addr_apt_num" size="40" required="No"/></td>
</tr>
<tr>
<td> --->
<tr>
<td>Home Address<br />
<!-- snip --> <span class="red">*</span> City</td>
<td><cfinput name="addr_city" type="text" id="addr_city" size="40" required="Yes" /></td>
</tr>
<tr>
<td> <span class="red">*</span> State</td>
<td><cfselect name="addr_st" id="addr_st" required="Yes">
<option selected="selected" value="">select state:</option>
<option value="DC">DC</option>
<option value="MD">MD</option>
<option value="VA">VA</option>
<option value="WV">WV</option>
</cfselect> </td>
</tr>
<tr>
<td> <span class="red">*</span> Zip+4 (<a href="http://zip4.usps.com/zip4/welcome.jsp" target="_blank">USPS Zip+4 Lookup</a>)</td>
<td><cfinput name="addr_zip_code" type="text" id="addr_zip_code" size="10" required="Yes" validate="zipcode" mask="99999-9999" /></td>
</tr>
<tr>
<td>Work Address</td>
<td nowrap="nowrap">NSF Headquarters, Wilson Boulevard, Arlington, VA 22230</td>
</tr>
<tr>
<td>If using SmartBenefits please provide the 9-digit serial number on the back of your SmarTrip card</td>
<td><cfinput name="smrt_bnft_srl" type="text" id="smrt_bnft_srl" size="15" /></td>
</tr>
</table>
<p><span class="subhead">Commuting Costs</span><br />
<img src="/images/bluefade.jpg" width="457" height="1" vspace="5" /><br />
Note: This program does not cover parking fees or the biking subsidy. Please do not include them when computing your expenses. </p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" colspan="6"><p><strong>Monthly Passes and Fees<br />
</strong>Enter information about any monthly passes you buy or monthly fees you pay below.<br />
<br />
</p></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tablehead" id="first_column_description" >Mode of Transportation </td>
<td class="tablehead" id="third_column_description" valign="top">Cost Per Month </td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Virginia Railway Express (VRE) </td>
<td valign="top" nowrap="nowrap" class="tabletext">$
<cfinput name="mnth_vre_cst" type="text" id="mnth_vre_cst" size="10" onchange="javascript:submitFrm();" validate="float" value="0"/></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Maryland Area Regional Commuter (MARC) Train </td>
<td class="tabletext" valign="top">$
<cfinput name="mnth_marc_cst" type="text" id="mnth_marc_cst" size="10" onchange="javascript:submitFrm();" validate="float" value="0" /></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Maryland Transit Administration (MTA) Bus </td>
<td class="tabletext" valign="top">$
<cfinput name="mnth_mta_cst" type="text" id="mnth_mta_cst" size="10" onchange="javascript:submitFrm();" validate="float" value="0"/></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Vanpool </td>
<td class="tabletext" valign="top">$
<cfinput name="mnth_van_cst" type="text" id="mnth_van_cst" size="10" onchange="javascript:submitFrm();" validate="float" value="0"/></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Other (specify):
<cfinput name="mnth_oth1_txt" type="text" id="mnth_oth1_txt" /></td>
<td class="tabletext" valign="top">$
<cfinput name="mnth_oth1_cst" type="text" id="mnth_oth1_cst" size="10" onchange="javascript:submitFrm();" validate="float" value="0"/></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Other (specify):
<cfinput name="mnth_oth2_txt" type="text" id="mnth_oth2_txt" /></td>
<td class="tabletext" valign="top">$
<cfinput name="mnth_oth2_cst" type="text" id="mnth_oth2_cst" size="10" onchange="javascript:submitFrm();" validate="float" value="0"/></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext"><strong>Total Monthly Passes and Fees </strong></td>
<td align="right" valign="top" class="tabletext"><strong>$<span id="monthtot"></span></strong></td>
</tr>
<tr>
<td valign="top" colspan="6">
<p> </p>
<p><strong>Daily Fares</strong><br />
Enter information about any daily fares you pay below.<br />
<br />
</p></td>
</tr>
<tr>
<td class="tablehead" id="first_column_description" valign="top" >Mode of Transportation </td>
<td class="tablehead" id="second_column_description" valign="top">Number of Days Per Week Mode of Transportation Is Used </td>
<td class="tablehead" id="second_column_description" valign="top">Roundtrip Cost </td>
<td class="tablehead" id="third_column_description" valign="top">Cost Per Week</td>
<td class="tablehead" id="third_column_description" valign="top">Average Weeks Per Month </td>
<td class="tablehead" id="third_column_description" valign="top">Cost Per Month </td>
</tr>
<td class="tabletext" valign="top">Metro Rail
<cfselect name="mtro_fare" id="mtro_fare" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select station:</option>
<cfinclude template="metro.cfm" />
</cfselect>
<cfinput name="mtro_stn" type="hidden" value="" />
</td>
<td class="tabletext" valign="bottom"><cfselect name="daly_mtro_rail_day" id="daly_mtro_rail_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0" >days per week:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect> </td>
<td align="right" valign="bottom" nowrap="nowrap" class="tabletext">$<span id="metroRT"></span></td>
<td align="right" valign="bottom" nowrap="nowrap" class="tabletext">$<span id="metroWK"></span></td>
<td align="center" valign="bottom" class="tabletext">4.2</td>
<td align="right" valign="bottom" class="tabletext">$<span id="metroMN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Metro Bus </td>
<td class="tabletext" valign="top"><cfselect name="daly_mtro_bus_day" id="daly_mtro_bus_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td valign="top" nowrap="nowrap" class="tabletext">$
<cfinput name="daly_mtro_bus_cst" type="text" id="daly_mtro_bus_cst" size="10" onchange="javascript:submitFrm();" value="0"/></td>
<td align="right" valign="top" nowrap="nowrap" class="tabletext">$<span id="busWK"></span></td>
<td align="center" valign="top" class="tabletext">4.2</td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="busMN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Virginia Railway Express (VRE)</td>
<td class="tabletext" valign="top"><cfselect name="daly_vre_day" id="daly_vre_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="top">$
<cfinput name="daly_vre_cst" type="text" id="daly_vre_cst" size="10" onchange="javascript:submitFrm();" value="0"/></td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="vreWK"></span></td>
<td align="center" valign="top" class="tabletext" nowrap="nowrap">4.2</td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="vreMN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Maryland Area Regional Commuter (MARC) Train </td>
<td class="tabletext" valign="top"><cfselect name="daly_marc_day" id="daly_marc_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="top">$
<cfinput name="daly_marc_cst" type="text" id="daly_marc_cst" size="10" onchange="javascript:submitFrm();" value="0"/></td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="marcWK"></span></td>
<td align="center" valign="top" class="tabletext">4.2</td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="marcMN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Maryland Transit Administration (MTA) Bus</td>
<td class="tabletext" valign="top"><cfselect name="daly_mta_day" id="daly_mta_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="top">$<cfinput name="daly_mta_cst" type="text" id="daly_mta_cst" size="10" onchange="javascript:submitFrm();" value="0"/></td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="mtaWK"></span></td>
<td align="center" valign="top" class="tabletext" nowrap="nowrap">4.2</td>
<td align="right" valign="top" class="tabletext" nowrap="nowrap">$<span id="mtaMN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other (specify):
<cfinput name="daly_oth1_txt" type="text" id="daly_oth1_txt" /></td>
<td class="tabletext" valign="bottom"><cfselect name="daly_oth1_day" id="daly_oth1_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="bottom">$
<cfinput name="daly_oth1_cst" type="text" id="daly_oth1_cst" size="10" onchange="javascript:submitFrm();" value="0"/></td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth1WK"></span></td>
<td align="center" valign="bottom" class="tabletext" nowrap="nowrap">4.2</td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth1MN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other (specify):
<cfinput name="daly_oth2_txt" type="text" id="daly_oth2_txt" /></td>
<td class="tabletext" valign="bottom"><cfselect name="daly_oth2_day" id="daly_oth2_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="bottom">$
<cfinput name="daly_oth2_cst" type="text" id="daly_oth2_cst" size="10" onchange="javascript:submitFrm();" value="0"/></td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth2WK"></span></td>
<td align="center" valign="bottom" class="tabletext" nowrap="nowrap">4.2</td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth2MN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other (specify):
<cfinput name="daly_oth3_txt" type="text" id="daly_oth3_txt" /></td>
<td class="tabletext" valign="bottom"><cfselect name="daly_oth3_day" id="daly_oth3_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="bottom">$
<cfinput name="daly_oth3_cst" type="text" id="daly_oth3_cst" size="10" value="0" onchange="javascript:submitFrm();"/></td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth3WK"></span></td>
<td align="center" valign="bottom" class="tabletext" nowrap="nowrap">4.2</td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth3MN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other (specify):
<cfinput name="daly_oth4_txt" type="text" id="daly_oth4_txt" /></td>
<td class="tabletext" valign="bottom"><cfselect name="daly_oth4_day" id="daly_oth4_day" onchange="javascript:submitFrm();">
<option selected="selected" value="0">select # of days:</option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
</cfselect></td>
<td class="tabletext" valign="bottom">$
<cfinput name="daly_oth4_cst" type="text" id="daly_oth4_cst" size="10" value="0" onchange="javascript:submitFrm();"/></td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth4WK"></span></td>
<td align="center" valign="bottom" class="tabletext" nowrap="nowrap">4.2</td>
<td align="right" valign="bottom" class="tabletext" nowrap="nowrap">$<span id="oth4MN"></span></td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="#f3f3f3"><img src="/images/hex-808080.gif" alt="" width="670" height="1" /></td>
</tr>
<tr>
<td valign="top" class="tabletext"><strong>Total Daily Fares Per Month </strong></td>
<td class="tabletext" valign="top"> </td>
<td class="tabletext" valign="top"> </td>
<td class="tabletext" valign="top"> </td>
<td class="tabletext" valign="top"> </td>
<td align="right" valign="top" class="tabletext"><strong>$<span id="dailytot"></span></strong></td>
</tr>
<tr>
<td valign="top" colspan="6"><p> </p>
<p><strong>Total Monthly Costs <br />
<br />
</strong></p></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Total Monthly Passes and Fees </td>
<td class="tabletext" valign="top">$<span id="monthtot2"></span></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Total Daily Fares Per Month </td>
<td class="tabletext" valign="top">$<span id="dailytot2"></span></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext"><strong>Total Monthly Costs <span id="warn" class="red"></span></strong></td>
<td valign="top" class="tabletext_large"><strong>$<span id="combtot"></span></strong></td>
</tr>
</table>
<p><span class="subhead"><br />
Certifications</span><br />
<img src="/images/bluefade.jpg" width="457" height="1" vspace="5" /><br />
Please read the following statements and certify your understanding and agreement below. Clicking the I Accept button will submit your application. </p>
<table border="0" cellpadding="6" cellspacing="0" width="100%">
<tbody><tr>
<td valign="top" nowrap="nowrap"><span class="red">*</span>
<cfinput name="cert1" id="cert1" value="cert1" type="checkbox" required="Yes"></td>
<td>I work for the National Science Foundation and am eligible to participate in this program. I will use transit benefits for my specific work-related commuting between my 1) home and office and/or 2) home and other <strong>local</strong> training/meeting/work sites. I will not use any portion of transit benefits to pay for parking. (NSF offers a separate fringe benefit program for parking.) I may use transit benefits for my commuting costs to and from work only. I will not sell or transfer transit benefits to anyone else. I will not use transit benefits to pay for official travel expenses or for any expenses for which I am otherwise compensated.</td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert2" id="cert2" value="cert2" type="checkbox" required="Yes"></td>
<td>The monthly benefits I receive may not exceed what I pay for eligible public transportation to commute to and from work. I usually spend <strong>$<span id="monthtot_cert"></strong> per month on public transportation to and from work, as calculated on the transit subsidy calculation form. My calculated expenses do not include any days on which I telework or otherwise routinely do not commute to and from work.</td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert3" id="cert3" value="cert3" type="checkbox" required="Yes"></td><td>I am not a member of another Federal agency's government-funded commuter vanpool or carpool and do not receive transportation benefits or a parking subsidy from another Federal agency.</td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert4" id="cert4" value="cert4" type="checkbox" required="Yes"></td><td>It is my responsibility to reduce what I accept in any month by the amount associated with any work days for which I know I will not be using covered public transportation to commute to and from work (e.g., for leave, travel, additional telework days, etc.)</td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert5" id="cert5" value="cert5" type="checkbox" required="Yes"></td><td>If I get SmartBenefits vouchers, it is my responsibility to return unused ones to the NSF each month. If I get electronic fare, it is my responsibility to reduce the fare I take by the unused amount in the previous month. If I receive nonrefundable monthly benefits (vanpool, monthly rail, monthly commuter bus) this is not applicable.</td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert6" id="cert6" value="cert6" type="checkbox" required="Yes"></td><td>I will submit a new application and costs calculation if my address/commuting expenses change. My benefits will be canceled when I leave the NSF, and I will not accept benefits after I depart.</td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert7" id="cert7" value="cert7" type="checkbox" required="Yes"></td><td>I understand that an NSF transit benefits coordinator will review a random sample of participants' actual hours worked; benefits distributions; fare calculations; addresses; leave requests; and travel authorizations/vouchers, to ensure recipients are receiving appropriate benefits. Staff will comply with the Privacy Act and appropriately protect and secure all random sample review data. </td>
</tr>
<tr>
<td valign="top"><span class="red">*</span>
<cfinput name="cert8" id="cert8" value="cert8" type="checkbox" required="Yes"></td><td>I have read the statements above and I certify that I accept the conditions of the program as stated above.</td>
</tr>
</tbody></table>
<p>This certification concerns a matter within the jurisdiction of the National Science Foundation, an agency of the United States, and making false, fictitious, or fraudulent certification may render me ineligible for future participation in the transit subsidy program; and subject to criminal prosecution, fine (up to $10,000 per violation), imprisonment and disciplinary action up to and including removal from Federal service. </p>
<cfoutput>
<cfinput type="hidden" name="appl_subm_date" value="#DateFormat(Now(), "mm/dd/yyyy")#">
<cfinput type="hidden" name="last_updt_user" value="#session.lan_id#">
<cfinput type="hidden" name="lan_id" value="#session.lan_id#" />
<cfinput type="hidden" name="tot_mnth_cost" value="" id="tot_mnth_cost" />
<cfinput type="hidden" name="tot_dly_cost" value="" id="tot_dly_cost" />
<cfinput type="hidden" name="rqst_tot" value="" id="rqst_tot" />
<cfinput type="hidden" name="appl_stts" value="Submitted" id="appl_stts" />
<input type="hidden" name="myaction" value="submit" />
</cfoutput>
<p><input id="submit" value="I Agree. Submit My Application." type="submit" onclick="javascript:ColdFusion.navigate('index.cfm',null,mycallBack,myError,'POST','tran_app');">
</p>
<!--- --->
<p>PRIVACY ACT STATEMENT: This information is solicited under authority of 5 U.S. C. Sections 301 and 7905. Furnishing the information on this form is voluntary, but failure to do so may result in disapproval of your request for a public transit fare benefit. The purpose of this information is to facilitate timely processing of your request, to ensure your eligibility, and to prevent misuse of the funds involved. This information may be matched with lists at other Federal agencies to ensure that you are not listed as a carpool or vanpool participant or a holder of any other form of vehicle work site parking permit with any Federal agency. </p>
</cfform>
========================================appl_form.cfm end
transit.cfc=======================================
<cfcomponent displayname="transit" hint="transit benefit calculator functions" output="false">
<cfset transit_email = "trinehar@nsf.gov">
<cffunction name="calculator" access="remote" returntype="Struct">
<cfargument name="mnth_vre_cst" type="Numeric" required="No" default="0">
<cfargument name="mnth_marc_cst" type="Numeric" required="No" default="0">
<cfargument name="mnth_mta_cst" type="Numeric" required="No" default="0">
<cfargument name="mnth_van_cst" type="Numeric" required="No" default="0">
<cfargument name="mnth_oth1_txt" type="String" required="No" default="">
<cfargument name="mnth_oth1_cst" type="Numeric" required="No" default="0">
<cfargument name="mnth_oth2_txt" type="String" required="No" default="">
<cfargument name="mnth_oth2_cst" type="Numeric" required="No" default="0">
<cfargument name="mtro_stn" type="String" required="No" default="">
<cfargument name="mtro_fare" type="Numeric" required="No" default="0">
<cfargument name="daly_mtro_rail_day" type="Numeric" required="No" default="0">
<cfargument name="daly_mtro_bus_day" type="Numeric" required="No" default="0">
<cfargument name="daly_mtro_bus_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_vre_day" type="Numeric" required="No" default="0">
<cfargument name="daly_vre_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_marc_day" type="Numeric" required="No" default="0">
<cfargument name="daly_marc_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_mta_day" type="Numeric" required="No" default="0">
<cfargument name="daly_mta_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_oth1_txt" type="String" required="No" default="">
<cfargument name="daly_oth1_day" type="Numeric" required="No" default="0">
<cfargument name="daly_oth1_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_oth2_txt" type="String" required="No" default="">
<cfargument name="daly_oth2_day" type="Numeric" required="No" default="0">
<cfargument name="daly_oth2_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_oth3_txt" type="String" required="No" default="">
<cfargument name="daly_oth3_day" type="Numeric" required="No" default="0">
<cfargument name="daly_oth3_cst" type="Numeric" required="No" default="0">
<cfargument name="daly_oth4_txt" type="String" required="No" default="">
<cfargument name="daly_oth4_day" type="Numeric" required="No" default="0">
<cfargument name="daly_oth4_cst" type="Numeric" required="No" default="0">
<cfset var strucData= {}>
<cfset strucData.monthsub = arguments.mnth_vre_cst + arguments.mnth_marc_cst + arguments.mnth_mta_cst + arguments.mnth_van_cst + arguments.mnth_oth1_cst + arguments.mnth_oth2_cst>
<cfset strucData.monthsub = NumberFormat(strucData.monthsub,'999.99')>
<!--- calculate daily totals --->
<cfset strucData.metroRT = NumberFormat(arguments.mtro_fare * 2,'999.99')>
<cfset strucData.metroWK = NumberFormat(strucData.metroRT * arguments.daly_mtro_rail_day,'999.99')>
<cfset strucData.metroMN = NumberFormat(strucData.metroWK * 4.2,'999.99')>
<cfset strucData.busWK = NumberFormat(arguments.daly_mtro_bus_cst * arguments.daly_mtro_bus_day,'999.99')>
<cfset strucData.busMN = NumberFormat(strucData.busWK * 4.2,'999.99')>
<cfset strucData.vreWK = NumberFormat(arguments.daly_vre_cst * arguments.daly_vre_day,'999.99')>
<cfset strucData.vreMN = NumberFormat(strucData.vreWK * 4.2,'999.99')>
<cfset strucData.marcWK = NumberFormat(arguments.daly_marc_cst * arguments.daly_marc_day,'999.99')>
<cfset strucData.marcMN = NumberFormat(strucData.marcWK * 4.2,'999.99')>
<cfset strucData.mtaWK = NumberFormat(arguments.daly_mta_cst * arguments.daly_mta_day,'999.99')>
<cfset strucData.mtaMN = NumberFormat(strucData.mtaWK * 4.2,'999.99')>
<cfset strucData.oth1WK = NumberFormat(arguments.daly_oth1_cst * arguments.daly_oth1_day,'999.99')>
<cfset strucData.oth1MN = NumberFormat(strucData.oth1WK * 4.2,'999.99')>
<cfset strucData.oth2WK = NumberFormat(arguments.daly_oth2_cst * arguments.daly_oth2_day,'999.99')>
<cfset strucData.oth2MN = NumberFormat(strucData.oth2WK * 4.2,'999.99')>
<cfset strucData.oth3WK = NumberFormat(arguments.daly_oth3_cst * arguments.daly_oth3_day,'999.99')>
<cfset strucData.oth3MN = NumberFormat(strucData.oth3WK * 4.2,'9999.99')>
<cfset strucData.oth4WK = NumberFormat(arguments.daly_oth4_cst * arguments.daly_oth4_day,'999.99')>
<cfset strucData.oth4MN = NumberFormat(strucData.oth4WK * 4.2,'999.99')>
<cfset strucData.dailysub = NumberFormat(strucData.metroMN + strucData.busMN + strucData.vreMN + strucData.marcMN + strucData.mtaMN + strucData.oth1MN + strucData.oth2MN + strucData.oth3MN + strucData.oth4MN,'99.99')>
<cfset strucData.combtotal = NumberFormat(strucData.monthsub + strucData.dailysub,'99.99')>
<cfreturn strucData>
</cffunction>
<cffunction name="getUserApps" access="remote"
description="get all submitted apps for a lan_id" returntype="query">
<cfargument name="UserId" type="String" required="Yes" default="">
<cfquery name="GetUserApps" datasource="transit" dbtype="Sybase">
select * from transit.rqst
where lan_id = '#arguments.UserId#'
</cfquery>
<cfreturn GetUserApps>
</cffunction>
<cffunction name="getPendingApps" access="remote"
description="get all pending approval" returntype="query">
<cfquery name="getPendingApps" datasource="transit" dbtype="Sybase">
select * from transit.rqst
where appl_stts = 'Submitted'
order by appl_subm_date ASC
</cfquery>
<cfreturn getPendingApps>
</cffunction>
<cffunction name="getVerifiedApps" access="remote"
description="get all approved" returntype="query">
<cfquery name="getVerifiedApps" datasource="transit" dbtype="Sybase">
select * from transit.rqst
where appl_stts = 'verified'
and appl_exp_date is NULL
order by appl_aprv_date DESC
</cfquery>
<cfreturn getVerifiedApps>
</cffunction>
<cffunction name="getPerson" access="remote"
description="get staffdir data" returntype="query">
<cfargument name="UserID" type="String" required="Yes" default="">
<cfquery name="GetPerson" datasource="staffadmin">
SELECT pers_id, frst_name, mid_name, last_name, email
FROM nsfs.pers
WHERE lan_id = '#arguments.UserID#'
</cfquery>
<cfreturn GetPerson>
</cffunction>
<cffunction name="getRole" access="remote"
description="get user role" returntype="query">
<cfargument name="UserID" type="String" required="Yes" default="">
<cfquery name="GetRole" datasource="transit">
SELECT role_type
FROM transit.user_roles
WHERE lan_id = '#arguments.UserID#'
AND role_exp_date is NULL
</cfquery>
<cfreturn GetRole>
</cffunction>
<cffunction name="getAppDetails" access="remote"
description="get application data by rqst_id" returntype="query">
<cfargument name="RID" type="String" required="Yes" default="">
<cfquery name="getAppDetails" datasource="transit" dbtype="Sybase">
select * from transit.rqst
where rqst_id = #arguments.RID#
</cfquery>
<cfreturn getAppDetails>
</cffunction>
<cffunction name="sendSubmit" access="remote" description="Sends emails on form submission">
<cfargument name="RID" type="String" required="Yes" default="">
<cfset AppDetails = getAppDetails(arguments.RID)>
<cfset get_name = getPerson(#AppDetails.lan_id#)>
<!--- a. Email to employee: --->
<cfprocessingdirective suppresswhitespace="No">
<cfmail from="#transit_email#"
subject="NSF Transit Benefits Application Received"
to="#AppDetails.lan_id#@nsf.gov"
cc="trinehar@nsf.gov"
type="Html">
<style type="text/css">
<!--
.tablehead {text-align:left; font-family:Verdana; font-size:x-small; font-weight:bold; background-color:##A5ABB2; color:##ffffff; padding-top:4px; padding-bottom:7px; padding-left:10px; padding-right:4px; border-right:1px white solid;}
.tablehead2 {text-align:left; font-family:Verdana; font-size:x-small; font-weight:bold; background-color:##A5ABB2; color:##ffffff; padding-top:4px; padding-bottom:7px; padding-left:10px; padding-right:4px; border-right:1px white solid; border-bottom:1px white solid;}
.tabletext {font-family:Verdana; font-size:x-small; background-color:##F3F1F1; color:##000000; padding:7px;}
.tabletext2 {font-family:Verdana; font-size:x-small; color:##000000; padding:7px;}
p, li { font-family: Verdana; font-size : 10pt; padding-left:6pt; line-height:14pt;}
-->
</style>
<p>Below is a copy of your Application for Transit Benefits. You will receive another email when your application has been verified by the DAS Transit Official. Please send any questions to DAS Transit.</p>
<table border="0" cellspacing="0" cellpadding="6">
<tr>
<td valign="top" class="tabletext2">Name</td>
<td valign="top" class="tabletext2">#get_name.frst_name# #get_name.mid_name# #get_name.last_name# (<a href="mailto:#get_name.email#">#get_name.email#</a>)</td>
</tr>
<tr>
<td valign="top" class="tabletext2">Address</td>
<td valign="top" class="tabletext2">
#AppDetails.addr_strt_num# #AppDetails.addr_strt_name#<cfif #AppDetails.addr_apt_num# NEQ ""> Apt #AppDetails.addr_apt_num#</cfif>, #AppDetails.addr_city#, #AppDetails.addr_st# #AppDetails.addr_zip_code#</td>
</tr>
<tr>
<td valign="top" class="tabletext2">Smart Benefit No.</td>
<td valign="top" class="tabletext2">#AppDetails.smrt_bnft_srl#</td>
</tr>
<tr>
<td valign="top" class="tabletext2" >Amount Requested</td>
<td valign="top" class="tabletext2">$#NumberFormat(AppDetails.rqst_tot,'9999.99')#</td>
</tr>
<tr>
<td valign="top" class="tabletext2">Date Submitted</td>
<td valign="top" class="tabletext2">#DateFormat(AppDetails.appl_subm_date, "mm/dd/yyyy")#</td>
</tr>
<tr>
<td valign="top" class="tabletext2">Status</td>
<td valign="top" class="tabletext2">#AppDetails.appl_stts#</td>
</tr>
<tr>
<td valign="top" class="tabletext2">Approval Date</td>
<td valign="top" class="tabletext2">#DateFormat(AppDetails.appl_aprv_date, "mm/dd/yyyy")#</td>
</tr>
</table>
<!--- <tr> --->
<p class="text"><span class="subhead">Detailed Commuting Costs</span><br />
<img src="/images/bluefade.jpg" width="457" height="1" vspace="5" /></p>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" colspan="6"><p class="text"><strong>Monthly Passes and Fees<br />
</strong><br />
</p></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tablehead" id="first_column_description" >Mode of Transportation </td>
<td class="tablehead" id="third_column_description" valign="top">Cost Per Month </td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Virginia Railway Express (VRE) </td>
<td align="right" valign="top" nowrap="nowrap" class="tabletext">$#AppDetails.mnth_vre_cst#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Maryland Area Regional Commuter (MARC) Train </td>
<td align="right" valign="top" class="tabletext">$#AppDetails.mnth_marc_cst#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Maryland Transit Administration (MTA) Bus </td>
<td align="right" valign="top" class="tabletext">$#AppDetails.mnth_mta_cst#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Vanpool </td>
<td align="right" valign="top" class="tabletext">$#AppDetails.mnth_van_cst#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Other:
#AppDetails.mnth_oth1_txt#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.mnth_oth1_cst#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Other: #AppDetails.mnth_oth2_txt#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.mnth_oth2_cst#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext"><strong>Total Monthly Passes and Fees </strong></td>
<td align="right" valign="top" class="tabletext"><strong>$#AppDetails.tot_mnth_cost#</strong></td>
</tr>
<tr>
<td valign="top" colspan="6">
<p class="text"><strong>Daily Fares</strong><br />
<br />
</p></td>
</tr>
<tr>
<td class="tablehead" id="first_column_description" valign="top" >Mode of Transportation </td>
<td class="tablehead" id="second_column_description" valign="top">Number of Days Per Week Mode of Transportation Is Used </td>
<td class="tablehead" id="second_column_description" valign="top">Roundtrip Cost </td>
<td class="tablehead" id="third_column_description" valign="top">Cost Per Week</td>
<td class="tablehead" id="third_column_description" valign="top">Average Weeks Per Month </td>
<td class="tablehead" id="third_column_description" valign="top">Cost Per Month </td>
</tr>
<tr>
<td class="tabletext" valign="top">Metro Rail:
#AppDetails.mtro_stn# </td>
<td align="center" valign="bottom" class="tabletext">#AppDetails.daly_mtro_rail_day#</td>
<td align="right" valign="bottom" nowrap="nowrap" class="tabletext">$#AppDetails.mtro_fare * 2#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.mtro_fare * 2 * AppDetails.daly_mtro_rail_day#</td>
<td align="center" valign="bottom" class="tabletext">4.2</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.mtro_fare * 2 * AppDetails.daly_mtro_rail_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Metro Bus </td>
<td align="center" valign="top" class="tabletext">#AppDetails.daly_mtro_bus_day#</td>
<td align="right" valign="top" nowrap="nowrap" class="tabletext">$#AppDetails.daly_mtro_bus_cst#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_mtro_bus_cst * AppDetails.daly_mtro_bus_day#</td>
<td align="center" valign="top" class="tabletext">4.2</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_mtro_bus_cst * 2 * AppDetails.daly_mtro_bus_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Virginia Railway Express (VRE)</td>
<td align="center" valign="top" class="tabletext">#AppDetails.daly_vre_day#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_vre_cst#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_vre_cst * AppDetails.daly_vre_day#</td>
<td align="center" valign="top" class="tabletext">4.2</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_vre_cst * AppDetails.daly_vre_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Maryland Area Regional Commuter (MARC) Train </td>
<td align="center" valign="top" class="tabletext">#AppDetails.daly_marc_day#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_marc_cst#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_marc_cst * AppDetails.daly_marc_day#</td>
<td align="center" valign="top" class="tabletext">4.2</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_marc_cst * AppDetails.daly_marc_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Maryland Transit Administration (MTA) Bus</td>
<td align="center" valign="top" class="tabletext">#AppDetails.daly_mta_day#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_mta_cst#</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_mta_cst * AppDetails.daly_mta_day#</td>
<td align="center" valign="top" class="tabletext">4.2</td>
<td align="right" valign="top" class="tabletext">$#AppDetails.daly_mta_cst * AppDetails.daly_mta_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other: #AppDetails.daly_oth1_txt#</td>
<td align="center" valign="bottom" class="tabletext">#AppDetails.daly_oth1_day#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth1_cst#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth1_cst * AppDetails.daly_oth1_day#</td>
<td align="center" valign="bottom" class="tabletext">4.2</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth1_cst * AppDetails.daly_oth1_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other: #AppDetails.daly_oth2_txt#</td>
<td align="center" valign="bottom" class="tabletext">#AppDetails.daly_oth2_day#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth2_cst#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth2_cst * AppDetails.daly_oth2_day#</td>
<td align="center" valign="bottom" class="tabletext">4.2</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth2_cst * AppDetails.daly_oth2_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other: #AppDetails.daly_oth3_txt#</td>
<td align="center" valign="bottom" class="tabletext">#AppDetails.daly_oth3_day#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth3_cst#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth3_cst * AppDetails.daly_oth3_day#</td>
<td align="center" valign="bottom" class="tabletext">4.2</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth3_cst * AppDetails.daly_oth3_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td class="tabletext" valign="top">Other: #AppDetails.daly_oth4_txt#</td>
<td align="center" valign="bottom" class="tabletext">#AppDetails.daly_oth4_day#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth4_cst#</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth4_cst * AppDetails.daly_oth4_day#</td>
<td align="center" valign="bottom" class="tabletext">4.2</td>
<td align="right" valign="bottom" class="tabletext">$#AppDetails.daly_oth4_cst * AppDetails.daly_oth4_day * 4.2#</td>
</tr>
<tr>
<td colspan="6" align="center" bgcolor="##f3f3f3"><img src="/images/hex-808080.gif" alt="" width="98%" height="1" /></td>
</tr>
<tr>
<td valign="top" class="tabletext"><strong>Total Daily Fares Per Month </strong></td>
<td class="tabletext" valign="top"> </td>
<td class="tabletext" valign="top"> </td>
<td class="tabletext" valign="top"> </td>
<td class="tabletext" valign="top"> </td>
<td align="right" valign="top" class="tabletext"><strong>$#AppDetails.tot_dly_cost#</strong></td>
</tr>
<tr>
<td valign="top" colspan="6">
<p class="text"><strong>Total Monthly Costs <br />
<br />
</strong></p></td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Total Monthly Passes and Fees </td>
<td class="tabletext" valign="top">$#NumberFormat(AppDetails.tot_mnth_cost,'9999.99')#</td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext">Total Daily Fares Per Month </td>
<td class="tabletext" valign="top">$#NumberFormat(AppDetails.tot_dly_cost,'9999.99')#</td>
</tr>
<tr>
<td colspan="5" valign="top" class="tabletext"><strong>Total Monthly Costs </strong></td>
<td valign="top" class="tabletext"><strong><span class="tabletext2">$#NumberFormat(AppDetails.rqst_tot,'9999.99')#</span></strong></td>
</tr>
</table>
<p>You have certified that you understand and agree with these statements:</p>
<ul>
<li>I work for the National Science Foundation and am eligible to participate in this program. I will use transit benefits for my specific work-related commuting between my 1) home and office and/or 2) home and other local training/meeting/work sites. I will not use any portion of transit benefits to pay for parking. (NSF offers a separate fringe benefit program for parking.) I may use transit benefits for my commuting costs to and from work only. I will not sell or transfer transit benefits to anyone else. I will not use transit benefits to pay for official travel expenses or for any expenses for which I am otherwise compensated.</li>
<li>The monthly benefits I receive may not exceed what I pay for eligible public transportation to commute to and from work. I usually spend #NumberFormat(AppDetails.rqst_tot,'9999.99')# per month on public transportation to and from work, as calculated on the transit subsidy calculation form. My calculated expenses do not include any days on which I telework or otherwise routinely do not commute to and from work.</li>
<li>I am not a member of another Federal agency's government-funded commuter vanpool or carpool and do not receive transportation benefits or a parking subsidy from another Federal agency.</li>
<li>It is my responsibility to reduce what I accept in any month by the amount associated with any work days for which I know I will not be using covered public transportation to commute to and from work (e.g., for leave, travel, additional telework days, etc.)</li>
<li>If I get SmartBenefits vouchers, it is my responsibility to return unused ones to the NSF each month. If I get electronic fare, it is my responsibility to reduce the fare I take by the unused amount in the previous month. If I receive nonrefundable monthly benefits (vanpool, monthly rail, monthly commuter bus) this is not applicable.</li>
<li>I will submit a new application and costs calculation if my address/commuting expenses change. My benefits will be canceled when I leave the NSF, and I will not accept benefits after I depart.</li>
<li>I understand that an NSF transit benefits coordinator will review a random sample of participants' actual hours worked; benefits distributions; fare calculations; addresses; leave requests; and travel authorizations/vouchers, to ensure recipients are receiving appropriate benefits. Staff will comply with the Privacy Act and appropriately protect and secure all random sample review data.</li>
<li>I have read the statements above and I certify that I accept the conditions of the program as stated above.</li>
</ul>
</cfmail>
<cfmail to="#transit_email#"
subject="NSF Transit Benefits Application Submitted by #get_name.frst_name# #get_name.mid_name# #get_name.last_name#"
from="#transit_email#"
type="html">
<style type="text/css">
<!--
.tabletext {font-family:Verdana; font-size:x-small; color:##000000; padding:7px;}
p, li { font-family: Verdana; font-size : 10pt; padding-left:6pt; line-height:14pt;}
-->
</style>
<p>An Application for Transit Benefits has been submitted by #get_name.frst_name# #get_name.mid_name# #get_name.last_name#. You can review and verify this application at .... </p>
</cfmail>
</cfprocessingdirective>
</cffunction>
<cffunction name="sendVerify" access="remote" description="Sends emails on form submission">
<cfargument name="RID" type="String" required="Yes" default="">
<cfset AppDetails = getAppDetails(arguments.RID)>
<cfset get_name = getPerson(#AppDetails.lan_id#)>
<!--- <cfset get_last = getPerson(#AppDetails.lan_id#)> --->
<!--- a. Email to employee: --->
<cfprocessingdirective suppresswhitespace="No">
<cfmail from="#transit_email#"
subject="NSF Transit Benefits Application Verified"
to="#AppDetails.lan_id#@nsf.gov"
cc="trinehar@nsf.gov"
type="Html">
<style type="text/css">
<!--
.tabletext {font-family:Verdana; font-size:x-small; color:##000000; padding:7px;}
p, li { font-family: Verdana; font-size : 10pt; padding-left:6pt; line-height:14pt;}
-->
</style>
<p>Your Application for Transit Benefits has been verified.</p>
</cfmail>
</cfprocessingdirective>
</cffunction>
<cffunction name="sendCancel" access="remote" description="Sends emails on form submission">
<cfargument name="RID" type="String" required="Yes" default="">
<cfset AppDetails = getAppDetails(arguments.RID)>
<cfset get_name = getPerson(#AppDetails.lan_id#)>
<!--- <cfset get_last = getPerson(#AppDetails.last_updt_user#)> --->
<!--- a. Email to employee: --->
<cfprocessingdirective suppresswhitespace="No">
<cfmail from="#transit_email#"
subject="NSF Transit Benefits Application Cancelled"
to="#AppDetails.lan_id#@nsf.gov"
cc="trinehar@nsf.gov"
type="Html">
<style type="text/css">
<!--
.tabletext {font-family:Verdana; font-size:x-small; color:##000000; padding:7px;}
p, li { font-family: Verdana; font-size : 10pt; padding-left:6pt; line-height:14pt;}
-->
</style>
<p> Your Application for Transit Benefits was cancelled on #AppDetails.last_updt_tmsp# by #AppDetails.last_updt_user#.</p>
</cfmail>
</cfprocessingdirective>
</cffunction>
</cfcomponent>