It's returning a JSON string. use JSON.parse() on the string and
you'll get a JavaScript object with arrays in it.

On Sun, Jul 27, 2008 at 8:08 AM, Ioannis Papanikolaou
<[EMAIL PROTECTED]> wrote:
> Hello everyone,
>
> I have deside to use the new CFajaxproxy.
>
> The functionality is truly simple from any point of view. However the way it 
> returns the the query results on my browser is messy,
>
> So far I was using the fantastic AjaxCFC product from Rob Gonda.
>
> THE CASE:
>
> A simple query on my compnent.cfc like this:
>
>                <cfquery name="GetNameForMenu" datasource="xxxx">
>                SELECT name_diplayed
>                FROM
>                object_table ot,
>                </cfquery>
>
> Would return me a nice structure of arays on my browser
> col7[0] = "name1";
> col7[1] = "name2";
> col7[2] = "name3";
> col7[3] = "name4";
> col7[4] = "name5";
> _3809_1217109963807["name_diplayed"] = col7;
>
> And then I could easily call it from my Javascript DOM functions like this:
>
> .....
> function Results (r){
> for(i=0;i<r.name_diplayed.length;i++){......};
>
>
> Problem with CFajaxProxy is that it returns my query results on a very messy 
> way that I dont know how to define and use the results:
>
> {"COLUMNS":["NAME_DIPLAYED"],"DATA":[["name1"],["name2"],["name3"],["name4"],["name5"]]}
>
> QUESTION :
>
> Does anyone know how I can return my query results as a structured aray like 
> ajaxCFC, while I am using CFajaxProxy?
>
> If not, Does anyone know how the I could take tha lenght of the results from 
> the above query using DOM, or even to display tha actual results as calling 
> them r.name_diplayed are undifined.

-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

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

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309757
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