4 messages in com.googlegroups.opensocial-api[OpenSocial] Re: gadgets.util.registe...| From | Sent On | Attachments |
|---|---|---|
| dragosh | 17 Jul 2008 03:15 | |
| fstmbt | 30 Jul 2008 17:37 | |
| anand sharma | 30 Jul 2008 22:32 | |
| anand sharma | 31 Jul 2008 10:12 |
| Subject: | [OpenSocial] Re: gadgets.util.registerOnLoadHandler() not working![]() |
|---|---|
| From: | fstmbt (fst...@gmail.com) |
| Date: | 07/30/2008 05:37:55 PM |
| List: | com.googlegroups.opensocial-api |
Hi, I've the same error in the simplest gadget: gadgets.util is null !
On 17 июл, 14:16, dragosh <andr...@yahoo.com> wrote:
Hi, i'm new to the open social API and gadgets and i'm trying to build one. I started with the "hello world" example , add it to my orkut profile in sandbox and worked. When i tried something like this :
.................................................... <Require feature="opensocial-0.7" /> </ModulePrefs> <Content type="html"> <![CDATA[ work work xx <script type="text/javascript">
function getData() { var req = opensocial.newDataRequest();
req.add(req.newFetchPersonRequest(opensocial.DataRequest.PersonID.OWNER),'o-wner'); req.send(fetchPersonHandler);}
function fetchPersonHandler(data) { if(!data.hadError()) { var owner = data.get('owner').getData(); var html = '<h2>My name is : '+ owner.getDisplayName() + '</ h2>'; alert(owner.getDisplayName()); document.getElementById('ownername').innerHTML = html; }
}
gadgets.util.registerOnLoadHandler(getData);
</script> <div id='ownername'> PM </div> ]]> </Content> </Module>
............it doesn't work anymore. I tried inserting an alert mesage before all the functions and befor gadget.util.registerOnLoadHandler and it displayed it, but if inserted after doesn't work! What am I doing wrong? Can anyone help me?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"OpenSocial Application Development" group.
To post to this group, send email to open...@googlegroups.com
To unsubscribe from this group, send email to
opensocial-api+unsu...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/opensocial-api?hl=en
-~----------~----~----~----~------~----~------~--~---




