在哪里可以找到非常简单的 jQuery/AJAX Coldfusion 教程?
编辑:在学习了一些教程后,我陷入了困境 此处
我是 jquery 新手,但对 Coldfusion 有一些经验。我一直渴望有一个简单的教程来展示 jQuery/AJAX 如何从 ColdFusion9 CFC 中提取查询并将其显示在 HTML 调用页面上。我尝试遵循此 ben_tutorial 但它太复杂了 我。还有另一个 教程,但我不想安装插件。我应该去哪里寻找?我正在谷歌搜索“jquery ajax Coldfusion”
Edit: After following a few tutorials I am stuck here
I am new to jquery but have some experience with Coldfusion. I have been desperate for an easy tutorial that shows how jQuery/AJAX pulls a query from a ColdFusion9 CFC and displays it on the HTML calling page. I tried following this ben_tutorial but it is too complex for me. There is also a another tutorial, but I do not want to install a plugin. Where should I be looking? I am googling "jquery ajax coldfusion"
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您没有详细说明要在客户端更新什么。表单很常见,因此如果您有客户端 html 表单,例如:
您将使用 Coldfusion 生成并发送 JSON 字符串。 JSON 字符串可能类似于:
要更新客户端上的数据,您将执行(coldfusion-page.cfm 是服务器端 ajax 响应程序的名称):
OR,如果您只想更新 div 或 textarea,例如:
您只需发送 html/text 并将 ajax 调用中的 success 函数替换为:
You didn't elaborate on what you want to update on the client side. Forms are common, so if you have client side html form like:
You would generate and send a JSON string with coldfusion. The JSON string could look something like:
To update the data on the client side you would execute (coldfusion-page.cfm is the name of your server side ajax responder):
OR, If you just want to update a div or textarea like:
you just send the html/text and replace the success function in the ajax call with:
我假设您对 HTML 有一定的了解。要完成您所要求的任务,请使用以下代码片段:
$.get 是一种简写方法,用于简单地检索给定的 URL。它后面的 function() 部分是对 Coldfusion 页面的请求完成时运行的部分。它所做的只是将返回的数据放入 ID 为“displaydiv”的 HTML 标记中。
确实没有比这更简单的了。
I assume you have a fair knowledge of HTML. To accomplish the sort of thing you are asking, use this snippet:
$.get is a shorthand method that simply retrieves the given URL. The function() part that follows it is what is run when the request to the coldfusion page completes. All it does is put the data that came back into the HTML tag with an ID of "displaydiv".
It really doesn't get simpler than this.
我找到的一些链接是:
你几乎永远不会去阅读这些关于 Coldfusion
Some links I found are:
You can almost never go wrong reading these blogs for coldfusion