
<cffunction name="getShippingOptions_CFQuery" access=
"remote" returntype="query">
<cfargument name="zipcode" type="any" required="yes">
<cfargument name="pounds" type="any" required="yes">
<cfset var options=ArrayNew(1)>
<cfset var baseCost=(zipcode / 10000) + (pounds * 5)>
<cfscript>
qOptions = queryNew("service, price");
newRow = QueryAddRow(qOptions, 3);
temp = QuerySetCell(qOptions, "service",
"Next Day", 1);
temp = QuerySetCell(qOptions, "price",
baseCost * 4, 1);
temp = QuerySetCell(qOptions, "service",
"Two Day Air", 2);
temp = QuerySetCell(qOptions, "price",
baseCost * 2, 2);
temp = QuerySetCell(qOptions, "service",
"Saver Ground", 3);
temp = QuerySetCell(qOptions, "price",
baseCost, 3);
</cfscript>
<cfreturn qOptions>
</cffunction>
</cfcomponent>
Going on from Here
As you can see, Flex makes it easy to communicate with your
web server no matter what protocol it’s running. Protocols
such as SOAP and AMF are as easy to use as invoking a method
on an object. And the E4X syntax built into ActionScript 3
makes parsing XML directly a snap.
Going on from Here | 77
Commenti su questo manuale