New to Lucee and trying to get a query to run inside a cfc that’s being called via ajax get request. (Though it doesnt even work if I call the cfc directly). I’m not getting any error messages, it just doesnt do anything. This is working on my old CF9 box. And If I move the query to the calling .cfm file, it works fine. I’ve enabled debugging and have purposely screwed up the query to attempt to get some sort of error message, but its not even attempting to run the query so no error is generated.
Not sure if I’m missing something in the server setup or not. Here’s the details.
var savePrintDate =
$.ajax({
async: true,
url: "cfc/BuildLabels.cfc?method=saveBuildLabelPrintDate&soNumber=" + soNumber + "&lineNumber=" + lineNumber + "&qtytoprint=" + qtytoprint + "&vamLine=" + vamLine,
type: "get",
dataType: "json",
success: function (data){
alert('what the buns');
},
error: function (xhr, textStatus, errorThrown){
alert(errorThrown);
}
});
And the CFC
<cfcomponent output="true">
<cfsetting requesttimeout="10"
showdebugoutput="true"
/>
<cffunction name="saveBuildLabelPrintDate" access="remote" output="true" returnFormat="json">
<cfargument name="soNumber" type="string" required="true" default="" />
<cfargument name="lineNumber" type="string" required="true" default="" />
<cfargument name="qtytoprint" type="string" required="true" default="" />
<cfargument name="vamLine" type="string" required="true" default="" />
<cfquery name="rsPrintDate" datasource="USRRad">
INSERT INTO dbo.BuildLabel
(
BuildLabel_Inv,
BuildLabel_Line,
BuildLabel_Qty,
BuildLabel_VAMLine
) values (
'#soNumber#',
'#lineNumber#',
'#qtytoprint#',
'#vamLine#'
)
</cfquery>
</cffunction>
</cfcomponent>
Any help is appreciated.