I am using the following code to call a cfc and fill a datagrid. <cfsavecontent variable="getData"> //create connection. Should be installed by default with CFMX7 with correct path var connection:mx.remoting.Connection = mx.remoting.NetServices.createGatewayConnection("http://#cgi.HTTP_HOST#/flashser vices/gateway/"); //declare service var myService:mx.remoting.NetServiceProxy; var responseHandler= {}; //put the controls in scope to avoid calling _root var commentID = commentID; var donorID = donorID; var lastname = lastname; var firstname = firstname; var keyword = keyword; var searchResults = searchResults; //make an object that will handle the response var responseHandler = {}; //function that receives the response responseHandler.onResult = function( results: Object ):Void { //when results are back, we show the text received searchResults.dataProvider = results; } //function that receives any error that may have occurred during the call responseHandler.onStatus = function( stat: Object ):Void { //if there is any error, show an alert alert("Error while calling cfc:" + stat.description); } //get service. First parameter is path to component and //the second it's the object that will handle the response myService = connection.getService("CustomerService.CFC.Searches", responseHandler ); //make call myService.getSearchData('#APPLICATION.dsn#',commentID.text,donorID.text,lastnam e.text,firstname.text,keyword.text); </cfsavecontent> I'm calling the remote by this code: <cfinput type="button" name="show" value="Submit" onclick="#getData#"> I don't get any action at all. If I intentionally change the name of the CFC I don't even get an error. I have other apps remoting off the same server and have no issue. Do you happen to see where I've screwed up? I don't have much hair left to pull out. I Appreciate it. Thanks.
I got it. <cfoutput> tags work well when trying to output a variable. <cfoutput><cfinput type="button" name="show" value="Submit" onclick="#getData#"></cfoutput> DOH! Time for beer.
Don't see what you're looking for? Try a search.
|