Hi Sure, I am not sure if this works document.getElementById('message').innerHTML(html);, but generally it should be like document.getElementById('message').innerHTML=html;
When I added and run your application it doen't give error but screen is blank. I tried to put same code at code runner but it gives JS error. This was just quick overview, check if it helps. I will review in detail once I get time. Thanks, Pravin On Apr 11, 4:08 pm, sure <[EMAIL PROTECTED]> wrote: > Hi all, > My code display plain text in the browser. I don't why it > displays like that . Every thing is fine in my code. I am using GGE > Opensocial application. > LINK:http://hosting.gmodules.com/ig/gadgets/file/117095757350149898065/fri... > > Code: > --------- > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE Module PUBLIC "-//GOOGLE//DTD GADGET//EN" "http:// > code.google.com/apis/gadgets"> > <Module> > <ModulePrefs title="Friends" > author="[EMAIL PROTECTED]" > description="Sample Friends data" > > > <Require feature="opensocial-0.7" /> > <!--<Locale lang="en" country="us" />--> > </ModulePrefs> > > <Content type="html"> > <![CDATA[ > > <script type="text/javascript"> > function getData() > { > var req = opensocial.newDataRequest(); > > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),'viewer'); > > req.add(req.newFetchPeopleRequest(opensocial.DataRequest.Group.VIEWER_FRIENDS),'viewerFriends'); > req.send(handleMyData); > > }; > function handleMyData(dataResponse) > { > var viewer = dataResponse.get('viewer').getData(); > var html = "Friends of:"+viewer.DisplayName(); > html +="<br /><ul>"; > var viewerfriends = > dataResponse.get('viewerFriends').getData(); > viewerfriends.each(fucntion(person) > { > html +="<li>"+person.DisplayName() > +"</li>"; > } > ); > html +="</ul>"; > document.getElementById('message').innerHTML(html); > }; > gadgets.util.registerOnLoadHandler(getData); > > </script> > <div id="message"></div> > ]]> > </Content> > > </Module> > > Thanking u > sure. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---