我一直無法得到Railo到一個新的CFC測試頁上工作,並保持在錯誤獲取「沒有定義Railo」控制檯Railo錯誤,當試圖通過AJAX
錯誤控制檯凸顯本節:
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>