Is there a way to send multipe variables through a cfml2js call at one time? I am sending an object with an embedded array, but I would like to send a single integer at the same time without having to embed it into the data object.
maybe im not getting you, but why don't you just write that single js var out to the page as you normally would? cfwddx cfml to js is great for creating JS objects, not single vars - even if it could do it, there's really no reason for it.
=========================================
Don't sweat the petty things and don't pet the sweaty things.
The problem is it is asynchronous. So the user can request a query which comes back in a cfml2js. Then they can request another and another etc. The only way to co-ordinate the query with the request is to send them both back at the same time.
The query results are assembled via a cf-loop into an object. It only seems reasonable to want to send the query parameters into a separate variable or object and send it back in the same request/response as I mentioned to keep them synchronized.
After all, it doesn’t seems that it would have been too difficult to add this functionality to cfml2js – to return two objects at the same time – just a matter of syntax after all. But I guess they didn’t see the need cause I just can’t make it work or find a hint that it might work.
well i don't really get what you're doing here without some code examples, i'm assuming your talking about some sort of ajaxian application if the issue is concurrency. if that is the case then you must be returning your JS as a string to be evaluated before another request is made. if so then there should be no harm just declaring the variable in the same place as your cfwddx tag (since it will also be evaluated). it still seems trivial to want to send 2 objects back instead of 1 top level object with 1 nested object for each response you want to send back. that is the purpose of objects after all.
The query results are assembled via a cf-loop into an object.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.