I have a page with a form that posts to salesforce.com's webto Lead service. I am trying to make an ajax version of this using jQuery.

我有一个页面,上面有一个表单,可以发布到salesforce.com的webto Lead服务。我正在尝试使用jQuery制作一个ajax版本。

Though the form in the page posts fine and I receive the data in my salesforce, Once I make an identical post structure to this form and then post with jQuery I get a 405.

虽然页面中的表单发布得很好,并且我在salesforce中收到了数据,但是一旦我创建了与此表单相同的post结构,然后使用jQuery发布了405。

Any help with this would be greatly appreciated.

如有任何帮助,我们将不胜感激。

Is there a difference between a posted form and a jquery post as far as what the receiving website can see?

在接收网站能看到的内容上,发布的表单和jquery post有什么区别吗?

2 个解决方案

#1


8

The problem you're running into here is referred to as the same origin policy, which says that XmlHttpRequests must be to the same domain the script is running on. If you need to do this via AJAX, it will need to post to a script running on your domain, which would then make the call out to SalesForce.

这里遇到的问题称为同源策略,该策略规定xmlhttprequest必须位于脚本运行的同一域。如果您需要通过AJAX实现这一点,它将需要向运行在您的域上的脚本发送消息,然后该脚本将向SalesForce发出调用。

更多相关文章

  1. 为什么在使用jquery读写表单输入时必须对字符串进行编码?
  2. 如何在进度条全屏表单界面上添加百分比状态
  3. 《锋利的jQuery》读书笔记 第5章 jQuery对表单、表格的操作及更
  4. jquery.validate.js使用之自定义表单验证规则
  5. Asp。NET MVC Ajax-Post表单和Ajax-Get
  6. 解析jquery实现回车键提交表单
  7. JQUERY中做表单验证,谁有带时间的日期选择控件?
  8. 深入学习jQuery选择器系列第七篇——表单选择器
  9. jQuery Validate 表单验证插件

随机推荐

  1. Android 动画框架代码分析
  2. This android SDk requires Android deve
  3. 浅谈Android下拉菜单Spinner
  4. Error:(15) No resource identifier foun
  5. android执行外部程序,类似DELPHI里的EXEC
  6. android 读取,写入图片到sd卡源码
  7. Android(安卓)自动更新之状态栏下载
  8. android -------- Android(安卓)Studio 4
  9. Android实现对HOME键的捕获和屏蔽
  10. Android调用系统应用程序