开发者

Coldfusion 7 and jquery ajax - need help with response

I am calling a remote CFC in ajax using Coldfusion 7. The CFC is set to return a value of 0 when all is successfully done. I have appended the URL to the CFC with "&returnformat=plain" and I have also set the returnformat attribute of the cfc to "plain".

But everytime I do the cfc call, I get the response back as a WDDX packet instead of plain text. I have tried omitting the "&returnformat=plain" from the URL string and lots of other things, but nothing seems to work.

Any thoughts?

Thank开发者_开发问答s in advance!

Gary


Unfortunately, returnformat is added in CF8, not available to CF7.

In this case, you might want to use this workaround:

in /remote/myFunc.cfm:

<cfsetting enableCFoutputOnly="yes">
<cfoutput>#createObject("component","myComp").myFunc(URL.param1,URL.param2)#</cfoutput>

FYI, CF7 has no clue what is JSON neither, so you'll need to use 3rd party udf/cfc. If you need one, see: http://www.coldfusionjedi.com/index.cfm/2010/11/3/Best-JSON-option-for-folks-not-running-ColdFusion-9

Time to upgrade your CF. :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜