2 Replies Latest reply on Aug 26, 2011 3:16 PM by insuractive

    Why do I get this error: The method GET was not found in component...?

    lchalnick Level 1

      I am using cfajaxproxy to create a JS object for a simple CFC. Whenever I attempt to invoke any method in this component, I get this error message in both the ColdFusion Ajax Logger window and in Firebug:

       

      The method GET was not found in component c:\mypath\mycomponent.cfc

       

      Of course, there is no method named "get" in this component and my code is not attempting to run a method by that name. Here's the code from the component:

       

      <cfcomponent displayname="My Component" >

      <cffunction name="test" access="remote" returntype="string" returnformat="JSON">
          <cfargument name="CityID">
          <cfreturn arguments.CityID>
      </cffunction>

      </cfcomponent>

       

      And here is the code in the script that calls this (which is located in a different subdirectory from the CFC):


      <cfajaxproxy cfc="myPath.myComponent" jsclassname="oMP">


      <script type="text/javascript">

          var objMP = new oMP();
      </script>

      ...

      <form NAME="frmMP" method="post" action="">
      ...

      <input type="button" value="test" onclick="alert(objMP.test(384));return true;">

      </form>

      ...

       

      There are no problems when I invoke this test method in cfscript by instantiating the component and then calling the function.

       

      Anyone have any clues as to what might be going on here? What is the significance of the reference to the GET method? Does this have something to do with HTTP GET?