I create a cfc which has one method and want to access from cfm file using jQuery.
it seems that jQuery does not recognize the component,\
I remember that I can check if this component and method is accessible from my browser, but I do not remember how.
Your help and information is great appreciated,
You can test the component by navigating to http://mysite.com:port/MyCFC.cfc?method=myMethod
Change the above URL to meet you environment. For instance it might be something like http://localhost:8500/model/remoting.cfc?method=login
As a quick aside, make sure you have set the CFC access to "remote".
If you are using a form to submit via AJaX to a CFC:
e.preventDefault(); // prevents form from standard submit
var $formData = $('#formName').serializeArray(); // Since this is submitting via AJaX, the submit button will not be included in the form scope
var $urlData = "//www.domain.com/components/myCFC.cfc?method=myFunction"; //As nic pointed out, change this to fit your environment
// Process code for successful action
This is what I typically use. Different scenarios have different settings.
Thanks a million for helping and information,