I started this problem when installing ColdFusion 2016 Update 4.
HTML:
<input type='button' name='btn' value='Click me' onclick='proxyFunc();'>
Proxy server:
<cfajaxproxy cfc='proxy' jsClassName="jsProxyClass" >
Javascript:
proxyFunc = function () { var proxyObj = new jsProxyClass(); proxyObj.setHTTPMethod("post"); proxyObj.setCallbackHandler (function (result) { console.log(result); }); proxyObj.func('X'); }
CFC:
<cffunction name='func' access='remote' returntype='string' > <cfargument name='arg' type='string' required='false' > <cfreturn 'What is my arg? ' & arguments.arg> </cffunction>
I set a breakpoint in my cfc and found that arguments.arg is not full and I have form.argumentcollection = {"arg": "X"}
If I change setHTTPMethod from "post" to "get", arguments.arg = "X", as expected.
I have a lot of code that worked perfectly before this CF update, and now it's all broken :(
Any help would be greatly appreciated. Thanks in advance.
javascript coldfusion ajax parameters
Steve teraji
source share