I looked at the firebug console after pasting this bit of code. The data was being set and read correctly. I guess the problem is in the part where you try to assign the json object (data1) to "test"'s innerHTML. See this for an example: http://code.google.com/apis/orkut/articles/tutorial/tutorial.html
cheers, shishir On Jun 9, 2:39 am, engin <yilmaz_en...@yahoo.com> wrote: > <?xml version="1.0" encoding="UTF-8"?> > <Module> > <ModulePrefs title="write and read data" height="400"> > <Require feature="opensocial-0.8"/> > </ModulePrefs> > <Content type="html"> > <![CDATA[ > <script> > gadgets.util.registerOnLoadHandler(data_write); > > function data_write () { > var req = opensocial.newDataRequest(); > var data1 = "examplevalue1"; > var data2 = "examplevalue2"; > req.add(req.newUpdatePersonAppDataRequest('VIEWER', > 'AppData1',data1)); > req.add(req.newUpdatePersonAppDataRequest('VIEWER', > 'AppData2',data2)); > req.send(data_read_request); > } > > function data_read_request() { > var dizi=new Array ("AppData1","AppData2"); > var req = opensocial.newDataRequest(); > req.add(req.newFetchPersonAppDataRequest('VIEWER',dizi), > 'returnval'); > req.send(data_read_response); > > } > > function data_read_response(data) { > var data1 = data.get('returnval').getData(); > document.getElementById("test").innerHTML=data1; > } > </script> > <div id='test'></div> > ]]> > </Content> > </Module> --~--~---------~--~----~------------~-------~--~----~ 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 opensocial-orkut+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/opensocial-orkut?hl=en -~----------~----~----~----~------~----~------~--~---