I don't see any place where you actually call your javascript
functions.  Try calling gadgets.util.registerOnLoadHandler(getData) as
I showed in the code in an earlier reply.  Also, you declare your html
variable as:
var html +=

Try just doing (also shown in the code in my earlier reply):
var html =

Here's code that works for me in the Orkut sandbox:
http://hosting.gmodules.com/ig/gadgets/file/100333716782745535077/test.xml

On Apr 12, 9:58 pm, sure <[EMAIL PROTECTED]> wrote:
> Hi keaka,
>                Once again my thanks for your quick reply. I did all
> the things what you said before.
> My url:http://hosting.gmodules.com/ig/gadgets/file/
> 117095757350149898065/open.xml
> But still i don't see anything in my page
> Thanking u
> sure.
>
> On Apr 13, 12:08 am, Keaka <[EMAIL PROTECTED]> wrote:
>
> > As far as I know, you can't preview OpenSocial apps in Google Gadget
> > Editor.  You can only preview regular Google Gadgets that don't
> > require the opensocial feature.  You'll need to add your app to an
> > OpenSocial container to see it in action.  For example, if you have an
> > Orkut developer account, you can add your application to your sandbox
> > on this page:http://sandbox.orkut.com/MyApps.aspx
>
> > Just paste in the URL of your xml file that's hosted through GGE.  You
> > can get the URL of your xml file by clicking on the filename in GGE
> > and copying the URL from the browser window that opens.
>
> > On Apr 12, 8:29 am, sure <[EMAIL PROTECTED]> wrote:
>
> > > Hi keeka,
> > >             Thanks fro your quick reply. I modified my code as u said.
> > > But still i don't show get message on my preview page in GGE.
> > > Mycode:
> > > -------------
> > > <?xml version="1.0" encoding="UTF-8"?>
> > > <Module>
> > > <ModulePrefs title="Friends" author="[EMAIL PROTECTED]"
> > > description="Sample Friends data" >
> > > <Require feature="opensocial-0.7" />
> > > </ModulePrefs>
>
> > > <Content type="html">
> > > <![CDATA[
> > > <script language="text/javascript">
> > > function getData()
> > > {
> > > var req = opensocial.newDataRequest();
> > > req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonId.VIEWER),'
> > >  viewer');
> > > req.send(handleMyData);};
>
> > > function handleMyData(dataResponse)
> > > {
> > > var viewer = dataResponse.get('viewer').getData();
> > > var html +="Friends of"+viewer.getDisplayName();
>
> > > document.getElementById('message').innerHTML = html;};
>
> > > </script>
> > > <div id="message" style="background-color:#EFEFEF;width:100px;">hello</
> > > div>
> > > ]]>
> > > </Content>
>
> > > </Module>
> > > Thanking u
> > > sure.
>
> > > On Apr 12, 5:32 pm, Keaka <[EMAIL PROTECTED]> wrote:
>
> > > > It looks like there are several problems. There isn't a closing right
> > > > bracket on the opening ModulePrefs tag so the xml isn't valid.
> > > > There's a missing end quote in the line:
> > > > dataResponse.get('viewer_friends)
>
> > > > so you have an unterminated string literal.  When you create the
> > > > request you should use opensocial.DataRequest.PersonId.VIEWER instead
> > > > of just VIEWER.  You should use gadgets.util.registerOnLoadHandler()
> > > > to call your getData function at the appropriate time.  Here's a
> > > > funcional, trimmed-down version of your code that just displays the
> > > > viewer name:
>
> > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > <Module>
> > > > <ModulePrefs title="Friends"
> > > > author="[EMAIL PROTECTED]"
> > > > description="Sample Friends data">
>
> > > > <Require feature="opensocial-0.7" />
> > > > </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.send(handleMyData);
>
> > > > };
>
> > > > function handleMyData(dataResponse)
> > > > {
> > > > var viewer = dataResponse.get('viewer').getData();
> > > > var html ="Friends of "+viewer.getDisplayName();
>
> > > > document.getElementById('message').innerHTML = html;
>
> > > > };
>
> > > > gadgets.util.registerOnLoadHandler(getData);
> > > > </script>
> > > > <div id="message" style="background-color:#EFEFEF;width:100px;">hello</
> > > > div>
> > > > ]]>
> > > > </Content>
> > > > </Module>
>
> > > > On Apr 12, 4:17 am, sure <[EMAIL PROTECTED]> wrote:
>
> > > > > Hi to Everybody,
> > > > >                             I am new to this for groops. I am using
> > > > > GGE for developing Opensocial code. When ever i publishing my code it
> > > > > displays plain text. I wonder where should i did the mistake in my
> > > > > code. Everything is fine in my code. I checked my code so many times.
> > > > > But i didn't get any mistake. My helloworld program is working fine.
> > > > > Please help me.
> > > > > open.xml
> > > > > --------------
> > > > > <?xml version="1.0" encoding="UTF-8"?>
> > > > > <Module>
> > > > > <ModulePrefs title="Friends"
> > > > > author="[EMAIL PROTECTED]"
> > > > > description="Sample Friends data"
>
> > > > > <Require feature="opensocial-0.7" />
> > > > > </ModulePrefs>
>
> > > > > <Content type="html">
> > > > > <![CDATA[
> > > > > <script language="text/javascript">
> > > > > function getData()
> > > > > {
> > > > > var req = opensocial.newDataRequest();
> > > > > req.add(req.newFetchPersonRequest(VIEWER),'viewer');
> > > > > req.add(req.newFetchPeopleRequest(VIEWER_FRIENDS),'viewer_friends');
> > > > > req.send(handleMyData);};
>
> > > > > function handleMyData(dataResponse)
> > > > > {
> > > > > var viewer = dataResponse.get('viewer').getData();
> > > > > var html +="Friends of"+viewer.getDisplayName();
> > > > > html +=':<br /><ul>';
> > > > > var viewerFriends = dataResponse.get('viewer_friends).getData();
> > > > > viewerFriends.each(function(person)
> > > > > {
> > > > > html +='<li>'+person.getDisplayName()+'</li>';}
>
> > > > > );
> > > > > html +='</ul>';
> > > > > document.getElementById('message').innerHTML = html;};
>
> > > > > </script>
> > > > > <div id="message" style="background-color:#EFEFEF;width:100px;"></div>
> > > > > ]]>
> > > > > </Content>
>
> > > > > </Module>
> > > > > -------------------------
>
> > > > > Please let me know where should i did the mistake.
> > > > > It dosen't display my friends data. It displays plain page.
>
> > > > > Thanking u
> > > > > sure.- Hide quoted text -
>
> > > > - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"OpenSocial Application Development" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to