cfajaxproxy alternate?
I have been using cfajaxproxy for a few weeks only, as I was training for it, the examples I've tried all worked. However, now as I'm working on a real application I keep getting an error of "exception thrown but not caught"? Heres is my code if anyone can guid me to the right direction:
rem.cfc:
<!-- function to check if friend or not -->
<cffunction name="checkname" access="remote" returntype="numeric">
<cfargument name="ref" type="numeric">
<cfquery name="checkfriend" datasource="blog">
SELECT friendshipid FROM friends WHERE
UserID = #SESSION.IsLoggedIn.UserID#
AND FriendID = #ARGUMENTS.ref#
</cfquery>
<cfreturn int(checkfriend.recordcount)>
</cffunction>
and here is my script:
<cfajaxproxy cfc="rem" jsclassname="rem"/>
<script>
function checkname(name){
var instance = new rem();
instance.setCallbackHandler(isfriend);
instance.setForm('nameform');
instance.checkname(name);
}
function isfriend(res){
if (res == 0)
ColdFusion.Window.show("addf");
else{
var locate = "test2.cfm?rel=";
window.navigate(locate + name);}
}
</script>
Yet, if my code is right, how can I avoid using cfajaxproxy and go on with using ajax myself connecting to my methods and functions. Because at this point all my ajax that has been built on cfajaxproxy does NOT work.
thank you everyone