coldfusion flash integration:
I have an arraycollection that is populated from a webservice. Users can edit all fields, and it is possible that every row in the database will need to be modified. I'm trying to find the best way to get this data back to coldfusion to modify several database rows at once. Is there a way to pass the arraycollection back to coldfusion as an object or array and loop through it on the server side. Any help (including code samples or tutorials) would be greatly appreciated. Eric
You want to turn everything into string vars (url encoded text to protect against special characters) when passing vars between flash and cf. You can use xml but its bigger and slower. You can turn array into comma delimited string then pass to cf as one var in flash: myArray = new Array("Joe","Fred"); myArrayVar = myArray.toString(); myArrayVar will then contain "Joe,Fred" Then pass the myArrayVar to cold fusion and in cold fusion turn it right back into an array splitting on the commas. If you had this on a cf page and loaded or sendAndLoaded that page, cf can pass the vars to flash like this: <cfoutput>&passArray=Joe,Fred&</cfoutput> Then you can split myArray = passArray.split(","); then myArray[0] will contain "Joe" that should get you goin.
Don't see what you're looking for? Try a search.
|