<script type="text/javascript"> gadgets.util.registerOnLoadHandler(requestComm);
var htmlout = ""; var me = null; var aff = []; function AddComm() { var req = opensocial.newDataRequest(); var mylink = document.getElementById("input_comm").value; aff = mylink; var json = gadgets.json.stringify(mylink); req.add(req.newUpdatePersonAppDataRequest("VIEWER", "thefield", json)); req.send(requestComm); } function requestComm() { var req = opensocial.newDataRequest(); var fields = [ "thefield" ]; req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER), "viewer"); req.add(req.newFetchPersonAppDataRequest("VIEWER", fields), "viewer_data"); req.send(handleRequestComm); } function handleRequestComm(data) { var mydata = data.get("viewer_data"); var viewer = data.get("viewer"); me = viewer.getData(); if (mydata.hadError()) { htmlout += data.getError(); return; } // Do something with the returned data - note the getData call doSomethingWithComm(mydata.getData()); } function doSomethingWithComm(data) { //Data is indexed by user id, and represents an object where keys //correspond with the app data fields. var mydata = data[me.getId()]["thefield"]; var ow = gadgets.util.unescapeString(mydata); aff = gadgets.json.parse(ow); document.getElementById('content_div').innerHTML += aff + "<br />"; } </script> this code, does not work, help !!! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Orkut Developer Forum" group. To post to this group, send email to opensocial-orkut@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---