1

我在我的 Force.com 站点中使用 JavaScript Remoting。除了我注意到的场景之外,这很好用,当我单击一个apex:commandLinkapex:commandButton在一个组件中打开我的组件时,我的 JavaScript 远程处理功能存在,然后当我尝试执行我的远程处理操作时,我收到如下错误。

Uncaught ReferenceError: Visualforce is not defined

apex:CommandLink当我之前没有单击 am或apex:commandButton以前的组件时,我没有收到此错误。以前有没有人遇到过这种情况,如果有的话,知道如何阻止错误发生吗?

4

1 回答 1

1

我假设您正在使用 Visual Force Page (VFP)。在您的 VFP 定义中,确保包含具有 JS 远程处理方法的控制器

<apex:page controller="YourController" ... />
于 2016-02-19T22:37:59.313 回答