Coldfusion 将javascript表单对象传递给远程CFC
我有两个文件:test.cfc和test.cfm。当我在Coldfusion 将javascript表单对象传递给远程CFC,coldfusion,Coldfusion,我有两个文件:test.cfc和test.cfm。当我在test.cfm中单击submit按钮时,出现以下错误: “错误:对象不支持方法的此属性” 我知道它与passForm函数中的表单引用有关。但在谷歌搜索了几个小时后,我仍然无法解决这个错误。有什么建议吗 测试cfc <cfcomponent> <cffunction name="getForm" returntype="String" access="remote"> <cfargum
test.cfm
中单击submit按钮时,出现以下错误:
“错误:对象不支持方法的此属性”
我知道它与passForm
函数中的表单引用有关。但在谷歌搜索了几个小时后,我仍然无法解决这个错误。有什么建议吗
测试cfc
<cfcomponent>
<cffunction name="getForm" returntype="String" access="remote">
<cfargument name="theForm" type="struct">
</cffunction>
</cfcomponent>
测试.cfm
<cfajaxproxy cfc="ajaxFunc.test" jsclassname="testCFC">
<script>
function passForm(theForm)
{
try
{
var e = new testCFC();
message = e.getForm(theForm);
ColdFusion.navigate('', 'myDiv');
}
}
</script>
函数passForm(theForm)
{
尝试
{
var e=新的testCFC();
message=e.getForm(theForm);
导航(“”,'myDiv');
}
}
您看过ColdFusion中的序列化JSON()
和反序列化JSON()
函数了吗
另外,看看下面的线程,它可能会对您有所帮助
希望有帮助。
迈克