Oops.
My bad. Brad was spot-on (sorry Brad).
Here's a snippet taking a CF array and converting it to a JS array,
which can then be looped over by the JS.
<cfset myArray = arrayNew(1) />
<cfset myArray[1] = "Tom" />
<cfset myArray[2] = "Dick" />
<cfset myArray[3] = "Harry" />
<cfoutput>
<script type="text/javascript">
var myJSArray = new Array(#listQualify(arrayToList(myArray),
"'")#);
for (var i=0; i<myJSArray.length; i++) {
alert(myJSArray[i]);
}
</script>
</cfoutput>
On 11/1/06, Charlie Griefer <[EMAIL PROTECTED]> wrote:
> as far as i can tell, your code is fine (as far as "mixing" CF and JS).
>
> you're not using JS to try and manipulate the CF variables, so i there
> shouldn't be any issues there.
>
> On 11/1/06, Richard White <[EMAIL PROTECTED]> wrote:
> > thanks brad that makes alot of sense actually.
> >
> > so just to make sure that i have it right, you can access a normal variable
> > such as session.name but not an array such as the one that i specified
> > above session.module[index]
> >
> > thanks very much
> >
> >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four
times a year.
http://www.fusionauthority.com/quarterly
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:258782
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4