>- see footer for list info -<
Then going on from what you have, write something that parses
[[[x,y,z],[1,2,3]],[etc]] into a string for JS (so outputting to screen),
and an array in CF.

If the format of [[[x,y,z],[1,2,3]],[etc]] proves troublesome, make it a
nested list, x,y,z|1,2,3|etc.,etc..,etc...

Ade

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Gary F
Sent: 30 December 2005 11:04
To: Coldfusion Development
Subject: Re: [CF-Dev] Shorthand for creating multidimensional arrays?


>- see footer for list info -<
But the js to wddx routine will only run at the client. I need it to run at
the server so CF can acquire the js array while it's processing the page.

e.g.
<HTML>
<CFSET jsArray="[[[x,y,z],[1,2,3]],[etc]]">
<CFSET cfArray=convertJSarray(jsArray)><!--- would be nice! --->
<!--- now I can use the array for CF purposes here --->
<SCRIPT>
myArray=<CFOUTPUT>#jsArray#</CFOUTPUT>
// add code to use the array for js purposes here
</SCRIPT>
</HTML>


On 12/30/05, Snake <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> Oh yes there is, I have used it. You can convert Js to WDDX easily.
> In fact I'm sure the Javascript API comes with CFMX, check in the scripts
> folder.
>
> Russ
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Adrian Lynch
> Sent: 29 December 2005 19:56
> To: Coldfusion Development
> Subject: RE: [CF-Dev] Shorthand for creating multidimensional arrays?
>
> >- see footer for list info -<
> Oh yeah!
>
> There's bound to be one out there, wddx is all over the place.
>
> Ade
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Gary F
> Sent: 29 December 2005 18:32
> To: Coldfusion Development
> Subject: Re: [CF-Dev] Shorthand for creating multidimensional arrays?
>
>
> >- see footer for list info -<
> I didn't think of that. Nice idea, but unfortunately there isn't a js2cf
> or
> js2wddx function. It only goes from cf/wddx to js.
>
> Gary.
>
>
>
> On 12/29/05, Adrian Lynch <[EMAIL PROTECTED]> wrote:
> >
> > >- see footer for list info -<
> > Not sure if it'll work for you, but look at cfwddx with JS2CF. It
> > might save you some typing...
> >
> > Ade
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] Behalf Of Gary F
> > Sent: 29 December 2005 17:10
> > To: [email protected]
> > Subject: [CF-Dev] Shorthand for creating multidimensional arrays?
> >
> >
> > >- see footer for list info -<
> > My last question for today, I promise! I need to share some arrays
> > between JavaScript and CF. I've been using shorthand notation to
> > create js arrays because it's very quick, easy to read (when indented
> > correctly), and compact.
> >
> > // example 3D js array:
> > myArray=
> >
> > [
> >
> >      [
> >
> > ['Gary','BMW','red'],
> >
> >            ['Fred','Ford']
> >
> >      ],
> >
> >            ['Claire','BMW','Green'],
> >
> >            ['Karen','Audi'],
> >
> >            ['Sally','Vauxhall','red']
> >
> >      ]
> >
> > ];
> >
> > // to get the make of Sally's car:
> >
> > sallysCar=myArray[1][2][1];
> >
> >
> >
> > The question is, can CF accept this sort of shorthand creation of
> arrays?
> > I
> > need to create lots of arrays by hand ultimate for the use of
> > javascript, but would like CF to make use of them too. I'd like to
> > avoid the verbose CF method of creating arrays. Am I flogging a dead
> > horse or have I overlooked something? Thanks.
> >
> > Gary.
>
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
> >-<
>
>
> _______________________________________________
>
> For details on ALL mailing lists and for joining or leaving lists, go to
> http://list.cfdeveloper.co.uk/mailman/listinfo
>
> --
> CFDeveloper Sponsors:-
> >- Hosting provided by www.cfmxhosting.co.uk -<
> >- Forum provided by www.fusetalk.com -<
> >- DHTML Menus provided by www.APYCOM.com -<
> >- Lists hosted by www.Gradwell.com -<
> >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help
> -<
>
_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

_______________________________________________

For details on ALL mailing lists and for joining or leaving lists, go to 
http://list.cfdeveloper.co.uk/mailman/listinfo

--
CFDeveloper Sponsors:-
>- Hosting provided by www.cfmxhosting.co.uk -<
>- Forum provided by www.fusetalk.com -<
>- DHTML Menus provided by www.APYCOM.com -<
>- Lists hosted by www.Gradwell.com -<
>- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<

Reply via email to