我无法让 Railo 在测试页面上使用新的 CFC,并在错误控制台中不断收到“Railo 未定义”
错误控制台突出显示此部分:
var _Railo_proxytest = Railo.ajaxProxy.init('/proxytest.cfc','proxytest');
代码 CFC:
<cfcomponent>
<cffunction name="test1" access="remote" returntype="string" output="no">
<cfargument name="name" type="string" required="yes" default="Nameless">
<cfreturn "#areguments.name#">
</cffunction>
</cfcomponent>
代码 CFM:
<cfajaxproxy cfc="proxytest" jsclassname ="proxytest">
<script>
var myProxy = new proxytest();
function runProxy() {
var name = document.getElementById("name").value;
var results = myProxy.sayHello(name);
}
</script>
<form>
<input type="text" id ="name">
<input type="button" onclick="runProxy()" value="Run">
</form>