I've been struggling for hours to get an array (aAssetToggled[LNum]
[T]) toJSON so I can save, by Ajax, it to a db in CakePHP - all I get
is '' - this is how Chrome shows it to me:
I'm sure I must be doing something wrong as all those 0's suggest that
Chrome, and presumably Prototype, think the array itself has no length
and contains zero-legth arrays. However, presumably because of the
lenience of the browsers, it still works exactly as it should in my js
code - I can ask aAssetToggled['LNum0']['T147'] for its value and I
I define the array initially with
var aAssetToggled = new Array();
empty it occassionally with:
if (it needs to be emptied)
aAssetToggled = ;
then repopulate it with:
aAssetToggled['LNum0'] = new Array();
aAssetToggled['LNum0']['T'147'] = "true";
Note that it was initially indexed with integers aAssetToggled
but I thought that might have been the problem (lots of empty space?)
so went with string keys.
Any idea what I'm doing wrong?
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptacul...@googlegroups.com.
To unsubscribe from this group, send email to
For more options, visit this group at