>- see footer for list info -<
Russ, funny you mention AJAX since the array is used to create a complex
series of AJAX driven menus! The 3D js array must be coded into each page
(I've now created a custom tag so CF can pass it to a js function and render
menus) but CF is still dumb as to what the js array actually means.

Incidently, I'd never use CFAJAX or similar libs because AJAX itself is
nothing more than 10 lines of straight forward javascript. CFAJAX is like
100x more complex and bloaty than what any single function actually
requires. I know it's supposed to make Ajax simple for people to use, but I
found it far simpler to code it myself - as if there's this big cloud of
mystery surrounding Ajax when it's nothing more than a background HTTP
GET/POST function.

Ade - javascript doesn't understand lists unless I use multiple splice(?)
functions which will make the 'array' hard to read, and then I'd have to
recode every line where I've referenced the array. Will toy will the idea.
:-)

Gary.

On 12/30/05, Snake <[EMAIL PROTECTED]> wrote:
>
> >- see footer for list info -<
> I think perhaps you might find using CFAJAX of benefit here, then you wont
> have to bother with the JS array, just pull the data directly from CF.
>
> Russ
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 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
> -<
>
_______________________________________________

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