Nice, wasn't aware of the 'quotedValueList' bit. :)
But that only solves part of my problem. I've got several two-dim arrays
that I have to loop on two different queries, see if there's a match, and
then spit out "arrayName[1stDim][2ndDim] = 1" to set the array value so I
can test whether it's present. And I'm having to spit these out one line at
a time, as far as the end source goes, which means it gets big. Ick. That's
what I'm trying to avoid.
I pondered a different method on my way home from work and I'm going to
mess with that shortly...
At 05:19 PM 4/30/2002 -0700, you wrote:
>here's a thought...
>
>For quick array creation in JS do this:
>
>..
>myArray = newArray(#quotedValueList("query.column")#);
>..
>
>I wrote this ad-hoc, so the syntax might be a little off, but I believe
>that's it.
>
>
>+-----------------------------------------------+
>Bryan Love
> Macromedia Certified Professional
> Internet Application Developer
> Database Analyst
>Telecommunication Systems
>[EMAIL PROTECTED]
>+-----------------------------------------------+
>
>"...'If there must be trouble, let it be in my day, that my child may have
>peace'..."
> - Thomas Paine, The American Crisis
>
>
>
>-----Original Message-----
>From: Scott Weikert [mailto:[EMAIL PROTECTED]]
>Sent: Tuesday, April 30, 2002 3:30 PM
>To: CF-Talk
>Subject: Using CF to populate JS variables efficiently
>
>
>Hey gang.
>
>Working on a little side project, that is very JS-heavy - do some reads from
>a DB, create and populate several Javascript arrays based on the DB queries
>(using CFLOOP, generally), so that the page, once loaded, doesn't need to go
>back to the server for more data.
>
>I'm trying to work up a better way of doing this. Right now, the page (and
>it's not even nearly done, just the basics) is around 2100 lines long in the
>end (page source), and a large chunk of that is array population lines (i.e.
>"arrayname[3][7] = 1;").
>
>I seem to recall seeing a chapter on one CF book some time back on CF and
>JS - going back and forth between them - but for the life of me I can't find
>such info in Forta's books (either the new editions or the previous
>editions).
>
>Any thoughts/recommendations?
>
>
>
______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists