House of Fusion
Home of the ColdFusion Community
Hostmysite Dedicated Hosting

Search cf-talk

September 06, 2008

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
   1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30         

Subscribe Now
Fusion Authority Quarterly Update - ColdFusion 8 Special Edition

For ColdFusion hosting try HostMySite.com.
Search over 2,500 ColdFusion resources here  >>>      
Home /  Groups /  ColdFusion Talk (CF-Talk)

cfajaxproxy

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Frank Wheatley
05/21/2008 04:49 PM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Frank Wheatley
05/22/2008 09:01 AM

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

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Azadi Saryev
05/22/2008 09:39 PM

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 -----


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists