title: Coldfusion 9 HTML form 500 internal server error
body: <p>I have a windows 2008 server with Coldfusion 9 installed. I have an application that submits a form, and upon submit gets the 500 Internal Server Error page. I have checked the logs and nothing is logged there. I have heard about the issue with submitting over 100 form fields, but my form submits 64, max. I have Enable Robust Exception Information checked with my IP address added and HTTP status codes unchecked. I can see all the debugging information on all pages up to the error page. I have output to a file all the information the page puts into the form fields and created a page with just those form fields and those values and it submits fine. I have been stuck on this for a week now. I don't know anything else to try. Any suggestions??? Please!!!!</p>
  
  <pre><code>&lt;!---  #Include Header Page Here ---&gt;
  &lt;cfset session.headertitle = "Budget Revision to Sponsored Project-Calculation"&gt;
  &lt;!--- &lt;cfinclude template="grantsys_header_nogif.cfm"&gt; ---&gt;
  &lt;cfinclude template="../ps_common_scripts/header.cfm"&gt;
  &lt;CFINCLUDE template="grants_logincheck.cfm"&gt; 
  &lt;cfset tfile=''&gt;
  
  &lt;!--- Get Page Inputs ---&gt;
  &lt;CFIF IsDefined ("Form.Setid") AND IsDefined("Form.SpeedType") AND IsDefined("Form.SpeedType_Sub")&gt;
      &lt;CFSET Setid = Trim(UCase(Form.Setid))&gt;
      &lt;CFSET SpeedType1 = Trim(UCase(Form.SpeedType))&gt;
      &lt;CFSET SpeedType2 = Trim(UCase(Form.SpeedType_Sub))&gt;
      &lt;CFLOCK SCOPE="SESSION" TYPE="EXCLUSIVE" TIMEOUT="2"&gt;
          &lt;CFSET Session.SpeedType2 = Trim(UCase(Form.SpeedType_Sub))&gt;
      &lt;/CFLOCK&gt;
  &lt;CFELSEIF IsDefined("URL.SpeedType") AND IsDefined("URL.SpeedType_Sub")&gt;
      &lt;CFSET Setid = Trim(UCase(Form.Setid))&gt;
      &lt;CFSET SpeedType1 = Trim(UCase(URL.SpeedType))&gt;
      &lt;CFSET SpeedType2 = Trim(UCase(URL.SpeedType_Sub))&gt;
      &lt;CFSET Session.SpeedType2 = Trim(UCase(URL.SpeedType_Sub))&gt;
  &lt;CFELSE&gt;
      &lt;P&gt;&lt;B&gt;Error:&lt;/B&gt; Expected page inputs are missing.&lt;/P&gt;
      &lt;CFINCLUDE template="br_footer.cfm"&gt;
      &lt;CFABORT&gt;
  &lt;/CFIF&gt;
  
  &lt;!--- If a SubSpeedType is specified (not NEW or blank)... ---&gt;
  &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
      &lt;!---Get Subheader data---&gt;
      &lt;CFQUERY name="qHdr2" datasource="#Application.DSN#"&gt;
          SELECT /*+ FIRST_ROWS */ SP.DEPTID, SP.FUND_CODE, 
              PF.GT_FUND_TITLE, 
              PJ.GT_CONTR_NO, 
              PJ.GT_PROJ_STARTDT, 
              PJ.GT_PROJ_EXPDT, 
              PJ.GT_SPON_NAME, 
              PJ.GT_PROJ_TITLE,
              PD.GT_PROJ_DIR, 
              PT.DESCR,
              PE.NAME 
          FROM    SYSADM.PS_SPEEDTYP_TBL SP, 
                  SYSADM.PS_GT_GM_PROJ PJ, 
                  SYSADM.PS_GT_GM_PROJ_PDPI PD,   
                  SYSADM.PS_DEPT_TBL PT, 
                  SYSADM.PS_GT_GM_HR_DATA PE,
                  SYSADM.PS_GT_GM_FUND PF 
          WHERE SP.SETID = '#Setid#' 
              AND SP.SPEEDTYPE_KEY = '#SpeedType2#'  
              AND SP.BUDGET_REF = (   SELECT MAX(BUDGET_REF) 
                                      FROM SYSADM.PS_SPEEDTYP_TBL 
                                      WHERE SETID = SP.SETID 
                                      AND SPEEDTYPE_KEY = SP.SPEEDTYPE_KEY 
                                      ) 
          AND PJ.SETID        =   SP.SETID 
          AND PJ.PROJECT_ID   =   SP.SPEEDTYPE_KEY 
          AND PJ.FUND_CODE(+) =   SP.FUND_CODE
          AND PJ.FUND_CODE BETWEEN 'A0000'  AND 'Z9999'
          AND PJ.EFF_STATUS   =   'A' 
          AND PJ.EFFDT = ( 
                          SELECT  MAX(PJ_ED.EFFDT) 
                          FROM    SYSADM.PS_GT_GM_PROJ  PJ_ED
                          WHERE   PJ_ED.SETID = PJ.SETID 
                          AND     PJ_ED.PROJECT_ID = PJ.PROJECT_ID 
                          AND     PJ_ED.EFFDT &lt;= SYSDATE )
          AND PD.SETID(+)     = PJ.SETID 
          AND PD.PROJECT_ID(+) = PJ.PROJECT_ID
          AND PD.EFFDT(+)     = PJ.EFFDT  
          AND PT.SETID        =   SP.SETID
          AND PT.DEPTID       =   SP.DEPTID
          AND PT.EFF_STATUS   =   'A' 
          AND PT.EFFDT = ( 
                          SELECT  MAX(PT_ED.EFFDT)   
                          FROM    SYSADM.PS_DEPT_TBL PT_ED
                          WHERE   PT_ED.SETID = PT.SETID 
                          AND     PT_ED.DEPTID = PT.DEPTID
                          AND     PT_ED.EFFDT &lt;= SYSDATE  )   
          AND PE.EMPLID(+)    =   PD.GT_PROJ_DIR  
          AND PF.SETID        =   SP.SETID 
          AND PF.FUND_CODE    =   PJ.GT_GM_FUND 
          AND PF.EFF_STATUS   =   'A' 
          AND PF.EFFDT = ( 
                          SELECT  MAX(PF_ED.EFFDT) 
                          FROM    SYSADM.PS_GT_GM_FUND PF_ED
                          WHERE   PF_ED.SETID = PF.SETID 
                          AND     PF_ED.FUND_CODE = PF.FUND_CODE 
                          AND     PF_ED.EFFDT &lt;= SYSDATE  )
          ORDER BY PD.GT_PRIME_PDPI DESC  
      &lt;/CFQUERY&gt;
      &lt;cfif "#qHdr2.RecordCount#" EQ 0&gt;
          &lt;P align="center"&gt;&lt;B&gt;Error:&lt;/B&gt; Project ID# &lt;cfoutput&gt;&lt;strong&gt;#SpeedType2#&lt;/strong&gt;&lt;/cfoutput&gt; cannot be found. Please go back and enter a valid Project ID.&lt;/P&gt;
          &lt;CFINCLUDE template="br_footer.cfm"&gt;
          &lt;CFABORT&gt;
      &lt;/cfif&gt;
  &lt;/CFIF&gt;
  
  &lt;!--- Display Data ---&gt;
  &lt;CFFORM action="br_submit_test.cfm?tfile" method="post" name="frmCalc" id="frmCalc"&gt;
      &lt;TABLE align="center" border="1" width="100%"&gt;
          &lt;TR bgcolor="Navy"&gt;
              &lt;TD colspan="2" align="left"&gt;&amp;nbsp;
  
              &lt;/TD&gt;
              &lt;TD colspan="3" align="center"&gt;
                  &lt;FONT size="+2" color="White"&gt;From&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD colspan="3" align="center"&gt;
                  &lt;FONT size="+2" color="White"&gt;To&lt;/FONT&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;CFOUTPUT&gt;
              &lt;TR&gt; 
                  &lt;TD colspan="2" align="left"&gt;
                      Setid: &lt;FONT&gt;&lt;B&gt;#Setid#&lt;/B&gt;&lt;/FONT&gt;                  
                  &lt;/TD&gt;
                  &lt;TD colspan="3" align="center"&gt;
                      &lt;B&gt;#SpeedType1#&lt;/B&gt;&amp;nbsp;
                      &lt;INPUT type="hidden" name="SpeedType1" value="#SpeedType1#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"SpeedType1 #SpeedType1#"&gt;&lt;br&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3" align="center"&gt;
                      &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
  
                          &lt;B&gt;#SpeedType2#&lt;/B&gt;&amp;nbsp;
                          &lt;INPUT type="hidden" name="SpeedType2" value="#SpeedType2#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"SpeedType2 #SpeedType2#"&gt;&lt;br&gt;
                      &lt;CFELSEIF SpeedType2 EQ "NEW"&gt;
                          SpeedType: &lt;input type="hidden" value="NEW" name="SpeedType2" size="10"&gt; (NEW)
                          &lt;cfset tfile=#tfile#&amp;"SpeedType2 NEW #SpeedType2#"&gt;&lt;br&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                          &lt;INPUT type="hidden" name="SpeedType2" value=""&gt;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      School/Center/Lab:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                       #qHdr1.DESCR# - #qHdr1.DEPTID#&amp;nbsp;
                      &lt;INPUT type="hidden" name="DEPTID1" value="#qHdr1.DEPTID# - #qHdr1.DESCR#&amp;nbsp;"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.DEPTID - qHdr1.DESCR  #qHdr1.DEPTID# - #qHdr1.DESCR#"&gt;&lt;br&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
                          #qHdr2.DESCR# - #qHdr2.DEPTID#&amp;nbsp;
                          &lt;INPUT type="hidden" name="DEPTID2" value="#qHdr2.DEPTID#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"qHdr2.DEPTID #qHdr2.DEPTID#"&gt;&lt;br&gt;
                      &lt;CFELSEIF SpeedType2 EQ "NEW"&gt;
                          &lt;CFQUERY name="querydeptid2" datasource="#Application.DSN#"&gt;
                              SELECT DISTINCT DEPTID, DESCR 
                              FROM SYSADM.PS_DEPT_TBL
                              ORDER BY DESCR
                          &lt;/CFQUERY&gt;              
                          &lt;SELECT size="1" name="DEPTID2"&gt;
                              &lt;CFLOOP query="querydeptid2"&gt;
                                  &lt;CFIF Trim(DESCR) EQ ""&gt;
                                      &lt;OPTION value="#DEPTID#"&gt;
                                          #DEPTID#
                                      &lt;/OPTION&gt;
                                  &lt;CFELSE&gt;
                                      &lt;OPTION value="#DEPTID#"&gt;
                                          #Left(DESCR,30)# - #DEPTID#
                                      &lt;/OPTION&gt;
                                  &lt;/CFIF&gt;
                              &lt;/CFLOOP&gt;
                          &lt;/SELECT&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Fund:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #qHdr1.FUND_CODE# - #qHdr1.DESCR#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="FUND_CODE1" value="#qHdr1.FUND_CODE# - #qHdr1.DESCR#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.FUND_CODE - qHdr1.DESCR #qHdr1.FUND_CODE# - #qHdr1.DESCR#"&gt;&lt;br&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                  &lt;!--- CC8254 - Begin ---&gt;
                  &lt;CFIF SpeedType2 EQ "NEW"&gt;
                      #qHdr1.FUND_CODE# - #qHdr1.DESCR#&amp;nbsp;
                  &lt;CFELSEIF SpeedType2 EQ ""&gt;
                        &amp;nbsp;
                  &lt;CFELSE&gt;
                      #qHdr2.FUND_CODE# - #qHdr2.DESCR#&amp;nbsp;
                  &lt;/CFIF&gt;
                  &lt;!--- CC8254 - End ---&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Project Director:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #qHdr1.GT_PROJ_DIR# - #qHdr1.NAME#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="NAME1" value="#qHdr1.GT_PROJ_DIR# - #qHdr1.NAME#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.GT_PROJ_DIR - qHdr1.NAME #qHdr1.GT_PROJ_DIR# - #qHdr1.NAME#"&gt;&lt;br&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
                          #qHdr2.GT_PROJ_DIR# - #qHdr2.NAME#&amp;nbsp;
                          &lt;INPUT TYPE="hidden" name="NAME2" value="#qHdr2.GT_PROJ_DIR# - #qHdr2.NAME#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_DIR - qHdr2.NAME #qHdr2.GT_PROJ_DIR# - #qHdr2.NAME#"&gt;&lt;br&gt;
                          #qHdr2.DEPTID#
                      &lt;CFELSEIF SpeedType2 EQ "NEW"&gt;
                          &lt;CFQUERY name="queryprojdir2" datasource="#Application.DSN#"&gt;
                              SELECT  DISTINCT A.GT_PROJ_DIR EMPLID, B.NAME
                              FROM    SYSADM.PS_GT_GM_FUND_PDPI A,
                                      SYSADM.PS_GT_GM_HR_DATA B
                              WHERE A.GT_PROJ_DIR = B.EMPLID
                              UNION
                              SELECT  DISTINCT A.GT_PROJ_DIR EMPLID, B.NAME
                              FROM    SYSADM.PS_GT_GM_PROJ_PDPI A,
                                      SYSADM.PS_GT_GM_HR_DATA B
                              WHERE A.GT_PROJ_DIR = B.EMPLID
                              ORDER BY 2,1 
                          &lt;/CFQUERY&gt;
                          &lt;SELECT size="1" name="NAME2"&gt;
                              &lt;CFLOOP query="queryprojdir2"&gt;  
                                      &lt;OPTION value="#EMPLID#"&gt;
                                          #NAME# - #EMPLID#
                                      &lt;/OPTION&gt;
                              &lt;/CFLOOP&gt;
                          &lt;/SELECT&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Award No.:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #qHdr1.GT_CONTR_NO#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_CONTR_NO1" value="#qHdr1.GT_CONTR_NO#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.GT_CONTR_NO #qHdr1.GT_CONTR_NO#"&gt;&lt;br&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                  &lt;!--- CC8254 - Begin---&gt;
                  &lt;CFIF SpeedType2 NEQ ""&gt;                    
                      #qHdr1.GT_CONTR_NO#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_CONTR_NO2" value="#qHdr1.GT_CONTR_NO#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.GT_CONTR_NO #qHdr1.GT_CONTR_NO#"&gt;&lt;br&gt;
                  &lt;/CFIF&gt;&amp;nbsp; 
                  &lt;CFIF SpeedType2 EQ "NEW"&gt;
                      #qHdr1.GT_CONTR_NO#&amp;nbsp;
                  &lt;CFELSEIF SpeedType2 EQ ""&gt;
                        &amp;nbsp;
                  &lt;CFELSE&gt;
                      #qHdr2.GT_CONTR_NO#&amp;nbsp;
                  &lt;/CFIF&gt;
                  &lt;!--- CC8254 - End ---&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Submission Date:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #DateFormat(Now(), "mm/dd/yyyy")#
                      &lt;INPUT TYPE="hidden" name="DATE1" value="#DateFormat(Now(), "mm/dd/yyyy")#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"Date 1 #DateFormat(Now(), "mm/dd/yyyy")#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      &lt;CFIF SpeedType2 NEQ ""&gt;
                          #DateFormat(Now(), "mm/dd/yyyy")#
                          &lt;INPUT TYPE="hidden" name="DATE2" value="#DateFormat(Now(), "mm/dd/yyyy")#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"Date 2 #DateFormat(Now(), "mm/dd/yyyy")#&lt;br&gt;"&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Start Date: 
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #DateFormat(qHdr1.GT_PROJ_STARTDT, "mm/dd/yyyy")#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_PROJ_STARTDT1" value="#DateFormat(qHdr1.GT_PROJ_STARTDT, "mm/dd/yyyy")#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_STARTDT1 #DateFormat(qHdr2.GT_PROJ_STARTDT, "mm/dd/yyyy")#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
                          #DateFormat(qHdr2.GT_PROJ_STARTDT, "mm/dd/yyyy")#&amp;nbsp;
                          &lt;INPUT TYPE="hidden" name="GT_PROJ_STARTDT2" value="#DateFormat(qHdr2.GT_PROJ_STARTDT, "mm/dd/yyyy")#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_STARTDT2 #DateFormat(qHdr2.GT_PROJ_STARTDT, "mm/dd/yyyy")#&lt;br&gt;"&gt;
                      &lt;CFELSEIF SpeedType2 EQ "NEW"&gt;
                          &lt;input type="text" name="GT_PROJ_STARTDT2" size="30" onChange = "return( isValidDate(this) &amp;&amp; CheckDate(this) )"&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                      &lt;CFIF SpeedType2 EQ "new"&gt;(mm/dd/yyyy)&lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      End Date: 
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #DateFormat(qHdr1.GT_PROJ_EXPDT, "mm/dd/yyyy")#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_PROJ_EXPDT1" value="#DateFormat(qHdr1.GT_PROJ_EXPDT, "mm/dd/yyyy")#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_EXPDT1 #DateFormat(qHdr2.GT_PROJ_EXPDT, "mm/dd/yyyy")#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;                    
                      &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
                          #DateFormat(qHdr2.GT_PROJ_EXPDT, "mm/dd/yyyy")#&amp;nbsp;
                          &lt;INPUT TYPE="hidden" name="GT_PROJ_EXPDT2" value="#DateFormat(qHdr2.GT_PROJ_EXPDT, "mm/dd/yyyy")#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_EXPDT2 #DateFormat(qHdr2.GT_PROJ_EXPDT, "mm/dd/yyyy")#&lt;br&gt;"&gt;
                      &lt;CFELSEIF SpeedType2 EQ "NEW"&gt;                      
                          &lt;input type="text" name="GT_PROJ_EXPDT2" size="30" onChange="return( isValidDate(this) &amp;&amp; CheckDate(this) )"&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                      &lt;CFIF SpeedType2 EQ "new"&gt;(mm/dd/yyyy)&lt;/CFIF&gt;
                          &lt;/TR&gt;
  
                  &lt;/TD&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Sponsor:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #qHdr1.GT_SPON_NAME#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_SPON_NAME1" value="#qHdr1.GT_SPON_NAME#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.GT_SPON_NAME1 #qHdr1.GT_SPON_NAME#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                  &lt;!--- CC8254 - Begin---&gt;
                  &lt;CFIF SpeedType2 NEQ ""&gt;
                      #qHdr1.GT_SPON_NAME#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_SPON_NAME2" value="#qHdr1.GT_SPON_NAME#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr1.GT_SPON_NAME2 #qHdr1.GT_SPON_NAME#&lt;br&gt;"&gt;
                  &lt;/CFIF&gt;&amp;nbsp;
                  &lt;CFIF SpeedType2 EQ "NEW"&gt;
            #qHdr1.GT_SPON_NAME#&amp;nbsp;
                  &lt;CFELSEIF SpeedType2 EQ ""&gt;
                        &amp;nbsp;
                  &lt;CFELSE&gt;
            #qHdr2.GT_SPON_NAME#&amp;nbsp;
                  &lt;/CFIF&gt;
                  &lt;!--- CC8254 - End ---&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
              &lt;TR&gt;
                  &lt;TD colspan="2"&gt;
                      Name of Project:
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      #qHdr1.GT_PROJ_TITLE#&amp;nbsp;
                      &lt;INPUT TYPE="hidden" name="GT_PROJ_TITLE1" value="#qHdr1.GT_PROJ_TITLE#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_TITLE1 #qHdr2.GT_PROJ_TITLE#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD colspan="3"&gt;
                      &lt;CFIF SpeedType2 NEQ "NEW" AND SpeedType2 NEQ ""&gt;
                          #qHdr2.GT_PROJ_TITLE#&amp;nbsp;
                          &lt;INPUT TYPE="hidden" name="GT_PROJ_TITLE2" value="#qHdr2.GT_PROJ_TITLE#"&gt;
                          &lt;cfset tfile=#tfile#&amp;"qHdr2.GT_PROJ_TITLE2 #qHdr2.GT_PROJ_TITLE#&lt;br&gt;"&gt;
                      &lt;CFELSEIF SpeedType2 EQ "NEW"&gt;
                          &lt;input type="text" name="GT_PROJ_TITLE2" size="30"&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
          &lt;/CFOUTPUT&gt;
  
          &lt;!--- Display Budget Totals &amp; Input Fields ---&gt;
          &lt;TR bgcolor="Navy"&gt;
              &lt;TD colspan="2"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;BUDGET CATEGORY&lt;/B&gt;&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD align="right"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;CURRENT&lt;BR&gt;BUDGET&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD align="right"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;INCREASE+&lt;BR&gt;DECREASE-&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD align="right"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;REVISED&lt;BR&gt;BUDGET&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD align="right"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;CURRENT&lt;BR&gt;BUDGET&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD align="right"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;INCREASE+&lt;BR&gt;DECREASE-&lt;/FONT&gt;
              &lt;/TD&gt;
              &lt;TD align="right"&gt;
                  &lt;FONT color="White"&gt;&lt;B&gt;REVISED&lt;BR&gt;BUDGET&lt;/FONT&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;       
          &lt;CFQUERY name="qData" datasource="#Application.DSN#"&gt;
              SELECT  X.FIELDVALUE, X.XLATSHORTNAME, 
                      H.PROJECT_ID PID1, H.BUDG_LTD BUD1, H.FISCAL_YEAR FY1, 
                      H.ACCOUNTING_PERIOD P1, H2.PROJECT_ID PID2, 
                      H2.BUDG_LTD BUD2, H2.FISCAL_YEAR FY2, 
                      H2.ACCOUNTING_PERIOD P2 
  &lt;!---       FROM    SYSADM.XLATTABLE X, SYSADM.PS_GT_GS_AMTS_HDR H, SYSADM.PS_GT_GS_AMTS_HDR H2    ---&gt;
              FROM    SYSADM.XLATTABLE_VW X, SYSADM.PS_GT_GS_AMTS_HDR H, SYSADM.PS_GT_GS_AMTS_HDR H2 
              WHERE   X.FIELDNAME = 'GT_SPONSORED_CAT'
                  AND X.FIELDVALUE NOT IN ('S89','SDT','SCH')
                  AND X.FIELDVALUE LIKE 'S%'
  &lt;!---           AND X.LANGUAGE_CD = 'ENG'   ---&gt;
                  AND X.EFF_STATUS = 'A'
                  AND X.EFFDT = (
                   SELECT MAX(EFFDT)
  &lt;!---            FROM SYSADM.XLATTABLE   ---&gt;
                   FROM SYSADM.XLATTABLE_VW
                   WHERE FIELDNAME = 'GT_SPONSORED_CAT'
                   AND FIELDVALUE = X.FIELDVALUE
  &lt;!---                AND LANGUAGE_CD = X.LANGUAGE_CD   ---&gt;
                   AND EFF_STATUS = X.EFF_STATUS
                   )
                  AND H.SETID (+) = '#Setid#' 
                  AND H.PROJECT_ID (+) = '#SpeedType1#'
                  AND H.GT_SPONSORED_CAT (+) = X.FIELDVALUE
                  AND (H.FISCAL_YEAR = (
                      SELECT MAX(FISCAL_YEAR) 
                      FROM SYSADM.PS_GT_GS_AMTS_HDR 
                      WHERE SETID = H.SETID 
                      AND PROJECT_ID = H.PROJECT_ID
                      ) 
                      OR
                      H.FISCAL_YEAR IS NULL) 
                  AND (H.ACCOUNTING_PERIOD = (
                      SELECT MAX(ACCOUNTING_PERIOD) 
                      FROM SYSADM.PS_GT_GS_AMTS_HDR 
                      WHERE SETID = H.SETID 
                      AND FISCAL_YEAR = H.FISCAL_YEAR 
                      AND PROJECT_ID = H.PROJECT_ID
                      ) 
                      OR 
                      H.ACCOUNTING_PERIOD IS NULL) 
                  AND H2.SETID (+) = '#Setid#' 
                  AND H2.PROJECT_ID (+) = '#SpeedType2#'
                  AND H2.GT_SPONSORED_CAT (+) = X.FIELDVALUE
                  AND (H2.FISCAL_YEAR = (
                      SELECT MAX(FISCAL_YEAR) 
                      FROM SYSADM.PS_GT_GS_AMTS_HDR 
                      WHERE SETID = H2.SETID 
                      AND PROJECT_ID = H2.PROJECT_ID
                      ) 
                      OR
                      H2.FISCAL_YEAR IS NULL) 
                  AND (H2.ACCOUNTING_PERIOD = (
                      SELECT MAX(ACCOUNTING_PERIOD) 
                      FROM SYSADM.PS_GT_GS_AMTS_HDR 
                      WHERE SETID = H2.SETID 
                      AND FISCAL_YEAR = H2.FISCAL_YEAR 
                      AND PROJECT_ID = H2.PROJECT_ID
                      ) 
                      OR 
                      H2.ACCOUNTING_PERIOD IS NULL) 
              ORDER BY X.FIELDVALUE 
          &lt;/CFQUERY&gt;
          &lt;CFSET TCurrBud = 0&gt;
          &lt;CFSET TCurrBudSub = 0&gt;
          &lt;CFOUTPUT query="qData"&gt;
          &lt;CFQUERY name="qCat" datasource="#Application.DSN#"&gt;
                  SELECT CAT.GT_LBL_#qData.FIELDVALUE# LABEL, CAT.GT_CAT_#qData.FIELDVALUE# CATEGORY
                  FROM SYSADM.PS_GT_GM_PROJ_CAT CAT
                  WHERE CAT.SETID = '#Setid#'
                      AND CAT.PROJECT_ID = '#SpeedType1#'
                      AND CAT.GT_CAT_KEY = 'CAT'
                      AND CAT.EFFDT = (
                          SELECT MAX(EFFDT)
                          FROM SYSADM.PS_GT_GM_PROJ_CAT CAT_DT
                          WHERE CAT_DT.SETID = CAT.SETID
                              AND CAT_DT.PROJECT_ID = CAT.PROJECT_ID
                              AND CAT_DT.GT_CAT_KEY = CAT.GT_CAT_KEY
                              )
              &lt;/CFQUERY&gt;
              &lt;CFQUERY name="qCatSub" datasource="#Application.DSN#"&gt;
                  SELECT CAT.GT_LBL_#qData.FIELDVALUE# LABEL, CAT.GT_CAT_#qData.FIELDVALUE# CATEGORY
                  FROM SYSADM.PS_GT_GM_PROJ_CAT CAT
                  WHERE CAT.SETID = '#Setid#'
                      AND CAT.PROJECT_ID = '#SpeedType2#'
                      AND CAT.GT_CAT_KEY = 'CAT'  
                      AND CAT.EFFDT = (
                          SELECT MAX(EFFDT)
                          FROM SYSADM.PS_GT_GM_PROJ_CAT CAT_DT
                          WHERE CAT_DT.SETID = CAT.SETID
                              AND CAT_DT.PROJECT_ID = CAT.PROJECT_ID
                              AND CAT_DT.GT_CAT_KEY = CAT.GT_CAT_KEY
                              )
              &lt;/CFQUERY&gt;
              &lt;TR&gt;
                  &lt;TD&gt;
                      #FIELDVALUE#
                      &lt;INPUT type="hidden" name="Cat#FIELDVALUE#" value="#FIELDVALUE#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"Cat#FIELDVALUE# #FIELDVALUE#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD&gt;
                      #XLATSHORTNAME#
                      &lt;INPUT type="hidden" name="CatName#FIELDVALUE#" value="#XLATSHORTNAME#"&gt;
                      &lt;cfset tfile=#tfile#&amp;"CatName#FIELDVALUE# #XLATSHORTNAME#&lt;br&gt;"&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;INPUT type="text" name="#FIELDVALUE#CurrBud" value="#NumberFormat(IIF(BUD1 IS "", "0", "BUD1"), "L9999999999.00")#" size="10" readonly&gt;
                      &lt;cfset tfile=#tfile#&amp;"#FIELDVALUE#CurrBud #NumberFormat(IIF(BUD1 IS "", "0", "BUD1"), "L9999999999.00")#&lt;br&gt;"&gt;
                      &lt;CFIF Bud1 NEQ ""&gt;
                          &lt;CFSET TCurrBud = TCurrBud + Bud1&gt;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
  &lt;!---                   &lt;INPUT type="Text" name="#FIELDVALUE#AdjBud" maxlength="10" size="10" onChange="return Calc('#FIELDVALUE#',0)"&gt; ---&gt;
                      &lt;CFIF "#qCat.CATEGORY#" EQ 'Y'&gt;
                          &lt;INPUT type="Text" name="#FIELDVALUE#AdjBud" maxlength="10" size="10" onChange="return CheckCalc('#FIELDVALUE#',0)"&gt;
                      &lt;CFELSE&gt;
                          &lt;input type="text" name="#FIELDVALUE#AdjBud" size="10" maxlength="10" readonly onChange="return CheckCalc('#FIELDVALUE#',0)"&gt;
                      &lt;/cfif&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;INPUT type="text" name="#FIELDVALUE#RevBud" value="#NumberFormat(IIF(BUD1 IS "", "0", "BUD1"), "L9999999999.00")#" size="10" readonly&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;CFIF SpeedType2 NEQ ""&gt;
                          &lt;INPUT type="text" name="#FIELDVALUE#CurrBudSub" value="#NumberFormat(IIF(BUD2 IS "", "0", "BUD2"), "L9999999999.00")#" size="10" readonly&gt;
                          &lt;cfset tfile=#tfile#&amp;"FIELDVALUECurrBudSub #FIELDVALUE#CurrBudSub #NumberFormat(IIF(BUD2 IS "", "0", "BUD2"), "L9999999999.00")#&lt;br&gt;"&gt;
                          &lt;CFIF Bud2 NEQ ""&gt;
                              &lt;CFSET TCurrBudSub = TCurrBudSub + Bud2&gt;
                              &lt;cfset tfile=#tfile#&amp;"TCurrBudSub #TCurrBudSub#&lt;br&gt;"&gt;
                          &lt;/CFIF&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;CFIF SpeedType2 NEQ ""&gt;
                          &lt;CFIF "#qCatSub.CATEGORY#" EQ 'Y' OR "#FORM.SpeedType_Sub#" EQ 'NEW'&gt;
                              &lt;INPUT type="Text" name="#FIELDVALUE#AdjBudSub" maxlength="10" size="10" onChange="return CheckCalc('#FIELDVALUE#',1)"&gt;
                          &lt;CFELSE&gt;
                              &lt;INPUT type="Text" name="#FIELDVALUE#AdjBudSub" maxlength="10" size="10" onChange="return CheckCalc('#FIELDVALUE#',1)" readonly&gt;
                              &lt;cfset tfile=#tfile#&amp;"FIELDVALUEAdjBudSub #FIELDVALUE#AdjBudSub&lt;br&gt;"&gt;
                          &lt;/CFIF&gt; 
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;CFIF SpeedType2 NEQ ""&gt;
                          &lt;INPUT type="text" name="#FIELDVALUE#RevBudSub" value="#NumberFormat(IIF(BUD2 IS "", "0", "BUD2"), "L9999999999.00")#" size="10" readonly&gt;
                          &lt;cfset tfile=#tfile#&amp;"NumberFormat(IIF(BUD2 IS , 0, BUD2), L9999999999.00) #NumberFormat(IIF(BUD2 IS "", "0", "BUD2"), "L9999999999.00")#&lt;br&gt;"&gt;
                      &lt;CFELSE&gt;
                          &amp;nbsp;
                      &lt;/CFIF&gt;
                  &lt;/TD&gt;
              &lt;/TR&gt;
          &lt;/CFOUTPUT&gt;
  
          &lt;!--- Display Totals ---&gt;
          &lt;CFOUTPUT&gt;
              &lt;TR bgcolor="Navy"&gt;
                  &lt;TD colspan="2" align="right"&gt;
                      &lt;FONT color="White"&gt;TOTALS:&lt;/FONT&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;INPUT type="text" name="CurrBudTotal" value="#NumberFormat(TCurrBud, "L9999999999.00")#" size="10" readonly&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;INPUT type="text" name="AdjBudTotal" value="#NumberFormat(0, "L9999999999.00")#" size="10" readonly&gt;
                  &lt;/TD&gt;
                  &lt;TD align="right"&gt;
                      &lt;INPUT type="text" name="RevBudTotal" value="#NumberFormat(TCurrBud, "L9999999999.00")#" size="10" readonly&gt;
                  &lt;/TD&gt;
                  &lt;CFIF SpeedType2 NEQ ""&gt;
                      &lt;TD align="right"&gt;
                          &lt;INPUT type="text" name="CurrBudSubTotal" value="#NumberFormat(TCurrBudSub, "L9999999999.00")#" size="10" readonly&gt;
                      &lt;/TD&gt;
                      &lt;TD align="right"&gt;
                          &lt;INPUT type="text" name="AdjBudSubTotal" value="#NumberFormat(0, "L9999999999.00")#" size="10" readonly&gt;
                      &lt;/TD&gt;
                      &lt;TD align="right"&gt;
                          &lt;INPUT type="text" name="RevBudSubTotal" value="#NumberFormat(TCurrBudSub, "L9999999999.00")#" size="10" readonly&gt;
                      &lt;/TD&gt;
                  &lt;CFELSE&gt;
                      &lt;TD align="right"&gt;
                          &lt;INPUT type="hidden" name="CurrBudSubTotal" value="0" size="10" readonly&gt;
                      &lt;/TD&gt;
                      &lt;TD align="right"&gt;
                          &lt;INPUT type="hidden" name="AdjBudSubTotal" value="0" size="10" readonly&gt;
                      &lt;/TD&gt;
                      &lt;TD align="right"&gt;
                          &lt;INPUT type="hidden" name="RevBudSubTotal" value="0" size="10" readonly&gt;
                      &lt;/TD&gt;
                  &lt;/CFIF&gt;
              &lt;/TR&gt;
          &lt;/CFOUTPUT&gt;
      &lt;/TABLE&gt;
  
      &lt;BR&gt;
  
      &lt;H2&gt;Department/Unit Approval:&lt;/H2&gt;
  
      Approved by:
      &lt;INPUT type="Text" name="Approvedby" size="20" maxlength="35"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      Title:
      &lt;INPUT type="Text" name="Title" size="20" maxlength="35"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      Date:
      &lt;cfinput type="Text" name="Date" required="No" size="20" maxlength="35" onChange="return (isValidDate(this))"&gt;
      &lt;BR&gt;
      &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;
      &lt;FONT color="black"&gt;(Department Officer/Project Director)&lt;/FONT&gt;
      &lt;HR&gt;
          &lt;P&gt;E-mail copy (or copies) of this request to the following e-mail address(es): 
              &lt;input type="text" name="CC_To" size="70" maxlength="250"&gt;
      &lt;BR&gt;
      &lt;BR&gt;
      &lt;HR&gt;
  &lt;!---
          &lt;B&gt;NOTIFICATION TO BE SENT TO:&lt;/B&gt;(Please enter name and fax number of individuals to receive copy of completed form)
      &lt;HR&gt;
  
      &lt;TABLE&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  &lt;B&gt;Title&lt;/B&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;B&gt;Name&lt;/B&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;B&gt;Fax Number&lt;/B&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  School/Department Director:
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="SDC" size="30" maxlength="35"&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="FaxNumber1" size="10" maxlength="15"&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  Project Director-Main Project:
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="PDMP" size="30" maxlength="35"&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="FaxNumber2" size="10" maxlength="15"&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  Project Director-Sub Project:
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="PDSP" size="30" maxlength="35"&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="FaxNumber3" size="10" maxlength="15"&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  School/Department Administrator:
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="SDA" size="30" maxlength="35"&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="FaxNumber4" size="10" maxlength="15"&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
          &lt;TR&gt;
              &lt;TD&gt;
                  Other: &lt;INPUT type="Text" name="othername" size="30" maxlength="15"&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="other" size="30" maxlength="35"&gt;
              &lt;/TD&gt;
              &lt;TD&gt;
                  &lt;INPUT type="Text" name="FaxNumber5" size="10" maxlength="15"&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
      &lt;/TABLE&gt;
  ---&gt;    
      Remarks (Maximum characters: 250):
      &lt;br&gt;
      &lt;!--&lt;textarea name="remarks" wrap="physical" cols="75" rows="3" maxlength="500"&gt;  CC8230 disabled mk5 --&gt;
      &lt;!--&lt;/textarea&gt;                                                                   CC8230 disabled mk5 --&gt;
  
    &lt;!-- CC8230 mk5 - Begin --&gt;
    &lt;TEXTAREA name="remarks" cols="75" onKeyDown="limitText(remarks,countdown,250);" 
              onKeyUp="limitText(remarks,countdown,250);"&gt;
    &lt;/TEXTAREA&gt;
    &lt;BR&gt;
    You have &lt;INPUT readonly type="text" name="countdown" size="3" value="250"&gt; characters left.&lt;/font&gt;
    &lt;!-- CC8230 mk5 - End --&gt;
  
      &lt;HR&gt;
      &lt;BR&gt;
  
  &lt;!--------------------------------------------------------------------------------------------&gt;
  &lt;!--- For testing                                                                          ---&gt;
  &lt;cffile action="write" file="location\tf99.txt" output=#tfile#&gt;
  &lt;!--------------------------------------------------------------------------------------------&gt;
      &lt;TABLE WIDTH = "100%"&gt;
          &lt;TR COLSPAN= "100%"&gt;
              &lt;TD align="right" width="50%"&gt;
                  &lt;INPUT type="submit" name="SubmitForm" value="Submit" onClick="return (CheckIfEmailEntered() &amp;&amp; CheckFundTotalConsistency())"&gt;
              &lt;/TD&gt;
              &lt;TD align="left" width="50%"&gt;
                  &lt;INPUT type="reset" name="ResetForm" value="Clear Form"&gt;
              &lt;/TD&gt;
          &lt;/TR&gt;
      &lt;/TABLE&gt;
  &lt;/CFFORM&gt;
  
  
  &lt;CFINCLUDE template="br_footer.cfm"&gt;
  
  &lt;/HTML&gt;
  </code></pre>
  
  <p>And here is the page it submits to (very simple page just to write the text file, which it's not doing):</p>
  
  <pre><code>&lt;!--- For testing---&gt;
  &lt;cffile action="write" file="\\eisdevl.nas.gatech.edu\coldfusion\test\cfapps\cfeis\grantsys\testing\tf100.txt" output=#URL.tfile#&gt;
  </code></pre>
  
  <p>On the page before the form, there is another form that only has 2 input boxes. If you input anything into the first box (SpeedType1) on that page everything goes fine. But if you enter anything into the first box (SpeedType1) AND the second box (SpeedType2), that's when I get the error page after submitting the form above. I've also checked the application.cfm file for cfcatch and cferror tags.</p>