Coldfusion 7 和 jquery ajax - 需要响应帮助

发布于 2024-09-30 08:47:28 字数 294 浏览 0 评论 0原文

我使用 Coldfusion 7 在 ajax 中调用远程 CFC。当所有操作成功完成时,CFC 设置为返回值 0。我已使用“&returnformat=plain”将 URL 附加到 CFC,并且还将 cfc 的 returnformat 属性设置为“plain”。

但每次执行 cfc 调用时,我都会以 WDDX 数据包而不是纯文本形式收到响应。我尝试从 URL 字符串中省略“&returnformat=plain”以及许多其他内容,但似乎没有任何效果。

有什么想法吗?

提前致谢!

加里

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?

Thanks in advance!

Gary

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

荒路情人 2024-10-07 08:47:28

不幸的是,CF8returnformat >,不适用于 CF7

在这种情况下,您可能需要使用以下解决方法:

在 /remote/myFunc.cfm 中:

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

仅供参考,CF7 也不知道 JSON 是什么,因此您需要使用第 3 方 udf/cfc。如果您需要,请参阅:http://www.coldfusionjedi.com/index.cfm/2010/11/3/Best-JSON-option-for-folks-not-running-ColdFusion-9

升级时间你的CF。 :)

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. :)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文