When I run my app, I got this error:
sdfst_catcherror is recording this error: Context validation
error for tag cfscript.; The start tag must have a matching end
tag. An explicit end tag can be provided by adding
</cfscript>. If the body of the tag is empty you can use the
shortcut <cfscript .../>.
The CFML compiler was processing:
a cfscript tag beginning on line 45, column 4.
a cfscript tag beginning on line 45, column 4.
When I checked my codes, all the
<cfscript></cfscript> have the pairs. There are only 2
pairs of <cfscript</cfscript> in this template.
See my code structure below:
<!--- the first <cfscript pair> --->
<cfscript>
function getTRS(var5)
{
some codes here...
return TRS;
}
</cfscript>
<cffunction name="FrmTxt" returntype="Struct">
<cfargument name="EmpCodes" required="true"
type="array">
<cfargument name="EmpID" required="true"
type="numeric">
<cfquery name="GetEmpInfo>
Select * from......
</cfquery>
<cfset varFrms = GetEmpInfo.EmpCodes>
<cfset A_Key = 1>
<cfset structFrmTxt = StructNew()>
<!--- The second pair --->
<cfscript>
Some codes here....
Need to output #TRS# returned by getTRS(var5) set above
</cfscript>
<cfreturn structFrmTxt>
</cffunction>
From other CF forum I learned that I can't put getTRS(var5)
within the second <cfscript></cfscript> within
<CFFUNCTION> pair
it says "You can't put UDF within UDF or method within
method". When I did originally, I got this error:
"
Unable to complete CFML to Java translation, Error
information unsupported statement: class
coldfusion.compiler.ASTfunctionDefinition
"
I'm stuck and can't find any resources to solve this problem
anymore, please help!....