September 06, 2008
For ColdFusion hosting try HostMySite.com. |
Home /
Groups /
ColdFusion Talk (CF-Talk)
cfajaxproxy
I am trying to use cfajaxproxy to call a cfc. This work on my local machine, but not in our testing environment.Frank Wheatley 05/21/08 04:49 P Is there some server setting that is causing the JSON to use htmlencoded quotes?Frank Wheatley 05/22/08 09:01 A try setting returntype="string" on your function?Azadi Saryev 05/22/08 09:39 P I am trying to use cfajaxproxy to call a cfc. This work on my local machine, but not in our testing environment. I get an error: JSON parsing failure: Expected '"' at character 2:'&' in {"encPolnum":"5061800"} If I remove the arguments the function works fine. Any idea why the html encoded " is used instead of " ? <cfajaxproxy cfc="webroot.#Request.SiteDir#.invservices.riskinfo" jsclassname="myproxy"> <script type="text/javascript"> p = new myproxy(); p.setCallbackHandler(handleResult); function handleResult(r) { alert(r); } function saveRiskObjective(obj){ var sPolnum = obj.id; p.saveRiskInfo(sPolnum); } </script> <cffunction name="saveRiskInfo" access="remote"> <cfargument name="encPolnum" type="string" required="Yes" /> <cfset var local = #encPolnum# /> <cfstoredproc procedure="#Request.sSchema#.pkg_riskinfo.saveRiskInfo" datasource="#Request.sDSN#" returncode="No"> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="sPolnum" value="5061800" null="No" /> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="sType" value="risktolerence" null="No" /> <cfprocparam type="In" cfsqltype="CF_SQL_VARCHAR" dbvarname="sValue" value="2" null="No" /> </cfstoredproc> <cfreturn local /> </cffunction> Frank Wheatley Is there some server setting that is causing the JSON to use htmlencoded quotes? JSON parsing failure: Expected '"' at character 2:'&' in {&"encPolnum&":&"5061800&"} If I remove the arguments the function works fine. Any idea why the html encoded &" is used instead of " ? > > Frank Wheatley try setting returntype="string" on your function? Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ Frank Wheatley wrote: ----- Excess quoted text cut - see Original Post for more -----
|
Mailing Lists
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||