I am trying to create a related drop down using flash remoting but it does not 
work. here is my code 

<cfset memberList =       queryNew("accessLevel,description") />                
  
      <cfsavecontent variable="getModel">
    <cfoutput>
        //create connection
        var connection:mx.remoting.Connection = 
mx.remoting.NetServices.createGatewayConnection("http://#cgi.HTTP_HOST#/ColdFusion8/gateway";);
        //declare service
        var myService:mx.remoting.NetServiceProxy;
    </cfoutput>

    var responseHandler = {};

    //put the controls in scope to avoid calling _root
    var accessType = accessType;
   
    responseHandler.onResult = function( results: Object ):Void {
        //when results are back, populate the cfselect
        accessType.labelField = "description";
        accessType.dataProvider = results;
                  
    }

    responseHandler.onStatus = function( stat: Object ):Void {
        //if there is any error, show an alert
        alert(stat.description);
    }
    
    //get service
    myService = connection.getService("flashRemotingResponder", responseHandler 
);
    //make call
    myService.accessType(accessL.selectedItem.AccessTypeID);
</cfsavecontent>


<cfselect  required="yes" label="Access Level" name="accessL" 
value="AccessTypeID" display="display" query="LoadaccessLevel" width="200" 
onChange="#getModel#"/>
                                                
                                                
                                          <cfselect name="accessType" 
label="Level" width="200" query="memberList" value="accessLevel" 
display="description" />


My cfc is here 
<cffunction name="LoadaccessLevelType" returntype="query" access="remote">
      <cfargument name="accessTypeID" required="yes" type="numeric">
      <cfset var data = ''>
      <cfquery name="data" datasource="cfelsunrise" dbtype="ODBC">
                        select distinct 
a.accessLevel,a.description,a.accessTypeID from accessLevel a
                        inner join AccessType  al on 
al.accessTypeID=a.accessTypeID
                        where a.accessTypeID = #arguments.accessTypeID#
                        order by a.accessTypeID
      </cfquery>
<!--- And return it --->
<cfreturn data>
</cffunction>

Please help 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:315988
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to