Ok still confused: I've got Names = { elements: {}, GUID: 0; update: function(id, value) { var realId = parseInt(id.split("_")[1], 10); Names.elements[realId] = value; }, add: function() { Names.GUID++; Names.elements[Names.GUID] = null; }, generateJSON: function() { return (Names.elements).toJSONString(); } }
Obviously return (Names.elements).toJSONString(); is going to break because I don't implement this method So - how do I return a JSON string representation of my element object so I can populate the hidden field? Justin Jesse Kuhnert wrote: > You don't need a json javascript library, that's the whole point of > the protocol. You just eval ' it and you're on your way. > > If you want to get the response back correctly eval'd for you and such > you can implement the function: > > tapestry.loadJson=function(type, data, http, kwArgs){ } > > "data" will be your json object structure. Ie if you returned > something like {this:value,means:nothing} you'd be able to do: > > > tapestry.loadJson=function(type, data, http, kwArgs){ > alert("Hey what does it mean?: " + data["means"]); > } > -- Justin Walsh http://www.ewage.co.za --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]