I upload the origanal code (look et the first message) to "hi5" sanbox
(ver 0.8), but it says that "activity is not defined" in:
activities.each(ShowActs(activity));
What have I done wrong?
I can read activities in 0.8, can't I?
On Sep 25, 9:40 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> why doesn't the following code work?
>
> function RefreshActs()
> {
> var req = opensocial.newDataRequest();
> req.add(req.newFetchActivitiesRequest("VIEWER"),
> "viewer_activities");
> req.send(onLoadActivities);
>
> }
>
> function onLoadActivities(data)
> {
> var activities = data.get('viewer_activities').getData()
> ['activities'];
> html = "<ul>";
> activities.each(ShowActs(activity));
> html += "<ul>";
> document.getElementById('Activities').innerHTML = "The activities:
> <br>";
> document.getElementById('Activities').innerHTML += html;
>
> }
>
> function ShowActs(activity)
> {
> html+="<li>"+
> activity.getField(opensocial.Activity.Field.TITLE)+"</li><br>"
>
> }
>
> The Firefox Firbug says that "activities" is null. why?
> By the way, I use Orkut Sandbox (open social 0.7).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---