<cffunction name="MyfunctionDelete" access="public" output="true" returntype="any"><!--- set returntype to 'any' and enable output ---> <cfargument name="id" default="0" /> <cfset arguments.id = val(arguments.id) /><!--- Ensures that if anything other than a number is submitted this will be '0'. ---> id:<cfdump var="#arguments.id#" /><cfreturn arguments.id /> <cfabort> <!--- .... rest of the code ---> </cffunction>
^ _ ^
You should be able to also use and/or dump the FORM scope. (It's easier in many cases too.) Doing this will let you know if it's different than what is being passed to the CFC (in case something is modifying it.)
I tried your example and ... without success.
I received the error that the parameter is not passed in.
So, I found the origin of the problem. The debugger of Firefox.
So, If you select "Console" in the Web Developer tool (See up part of the print screen), and you execute the ajax call, when you dump the result is without your variables.
Now, if you select "Network" and you select your "POST", Now you can see your parameter (See the lower part of the print screen).
Now, I see my mistake in my code and I will resolve in 10min.
Thank you to you for your support.