> beautiful use of JSStringFormat() Isaac!  You know I
> fought with errant '
> and " in my JS for like a year and a half before
> discovering this function.
> Now, doesn't the below creae an array of 3d arrays?  A
> true 3D array is nto
> available like CF, IIRC.  Anyhoo, I've used the below
> approach also

> var sys = new Array;
>   <cfoutput query="rates" group="billsystem">
>    sys['#JSStringFormat(rates.billsystem)#'] = new Array;
>    <cfoutput group="rateplan">

> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat
> (rates.rateplan)#'
> ] = new Array
>     <cfoutput group="descr">

> sys['#JSStringFormat(rates.billsystem)#']['#JSStringFormat
> (rates.rateplan)#'
> ]['#JSStringFormat(rates.descr)#'] =
> '#JSStringFormat(rates.url)#';
>     </cfoutput>
>    </cfoutput>
>   </cfoutput>

Offhand, the syntax looks a bit odd... you've got

sys['#jsstringformat(something)#'] = new Array;

Where "sys" is an existing array... which may work with some
_javascript_ engines if "something" is an integer, although generally
speaking you wouldn't use jsstringformat() or quotes for this value
since a _javascript_ array is always indexed with integers. If you were
to change "sys" from an array to an Object (again, case sensitive like
everything in JS), then you would want to use the quotes and the
jsstringformat() function, since the Object behaves much like a CF
structure or associative array, having members which are referenced by
name instead of an arbitrary order (as an Array). Objects can also
have functions or methods as members, although at least with previous
versions of JS it was described as "object based" not "object
oriented". I'm not certain but I think the more recent versions of
ECMAScript/JS are described as "object oriented" now.

s. isaac dealey     954.927.5117
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.sys-con.com/story/?storyid=44477&DE=1
http://www.sys-con.com/story/?storyid=45569&DE=1
http://www.fusiontap.com
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to