Hello there,

I'm making a GET request to a remote server, but it seems that the
data doesn't get loaded in time, it returns undefined. It's not a
problem with the server since it provides the data properly. Try for
example: 
http://www.inoveinformatica.net/orkut-app/myTeamsJson.php?user_id=08152625651690314134

What's weird is that when I use a preloader:

<Preload href="http://www.inoveinformatica.net/orkut-app/
myTeamsJson.php?user_id=08152625651690314134"/>

it works, loading the content in data. But I can't use the preloader
here because I have to pass parameters dinamically. So what should I
do? What is the problem here? I'm stucked! any help is appreciated..

The request code:

function loadMyTeams(){
    var params = {};
    params[gadgets.io.RequestParameters.CONTENT_TYPE] =
gadgets.io.ContentType.JSON;
    gadgets.io.makeRequest(baseUrl + 'myTeamsJson.php?user_id=' +
owner.getId(), onLoadMyTeams, params);
}


function onLoadMyTeams(data){

    if (data.data && data.data.length > 0) { // data.data is
undefined!

        globalMyTeams = data.data;
        makeMyTeamsList();
   }
}

-- 
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-or...@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.

Reply via email to