While I haven't mastered all the finer points of Javascript (and therefore can't exactly explain why your code didn't work), I do have a suggestion: try using the wonderful Mochikit function keys():
for (var x in keys(o.p)) document.write 0.p[x] Jeremy On Oct 3, 11:34 am, delsur <[EMAIL PROTECTED]> wrote: > Hi, > > I am learning turbogears and I am interested in to solve this problem > related to mochikit: > > I am calling a procedure in my controller with > doSimpleXMLHttpRequest(url+"/miprocedure"); > > from this procedure in my controller , I am returning a dict with a > sqlobject select() , for example: > > p = Pers.selec() > return dict(p=p) > > in my callback function in javascript, I am making > > var o = evalJSONRequest(xmlhttp); > > and > > document.write o.p > > and I have: [object Object] as output > > OK . o.p is an object but how can I display its contents ? > > I tried with: > > for (var x in o.p) > document.write 0.p[x] > > but nothing... > > the response from my controller is OK, I saw with firebug, I think > that there is something elemental that I am not understanding about > javascript objects. > > Can someone helps me ? > > thanks ! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to mochikit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---