I am using ColdFusion 8.0.1 and jQuery 1.4.3
I am passing values to a jQuery function that calls a CFC.
The problem is that the function is being fired twice, and I can't figure out why. I looked over everything and I am not doing anything other than this code in query. When the CFC is first accessed, it succeeds, meaning the value is saved into an array and returns true. (I can see this in Firebug.) Then, the CFC is called again and just hangs out there and never returns anything.
I am using CFAJAXPROXYlike this:
<!--- CREATE AJAX PROXY --->
<cfajaxproxy cfc="avcat.udf.udf_library" jsclassname="jsApp">
My link looks like this:
<a class="AddToList" href="?" product="550695">add item to my list</a>
My jQuery looks like this:
// ADD ITEM LINK WAS CLICKED
$(".AddToList").click(function(event) {
event.preventDefault();
var Product_ID = $(this).attr("product");
var jro = new jsApp();
var Success = jro.updateUserProductArray(Product_ID);
});
My CFC looks like this:
<cffunction name="updateUserProductArray" access="remote">
<cfreturn true>
</cffunction>
In Firebug, the first call to the CFC returns true. The second call just hangs forever.
ANSWER
The webmaster had some extra code in place that reloaded the page if any characters were in upper case, which there were. We removed that unnecessary code of his and everything worked just fine.