Hi All,
I'm facing some very unusual problem in one of my application. There
is one section where I detect the GENDER of the viewer(owner of my
application) and depending on which shows options to him/her. But it
works some time and the other time it wont. It gives error as
"ownr_sex is undefined". Below is the code of the function where I'm
using this variable.

function getSection()
{
var params = {};
params[opensocial.DataRequest.PeopleRequestFields.PROFILE_DETAILS] =
[opensocial.Person.Field.GENDER];

        var req = opensocial.newDataRequest();
        req.add(req.newFetchPersonRequest
(opensocial.DataRequest.PersonId.OWNER, params),'owner');

        req.send(handleData);
};

function handleData(resp)
{
        var uri, contain;
        uri='http://xyz.com/api/ki/exchange';
        contain='main_content';

        var owner = resp.get("owner").getData();
        var ownr_sex = owner.getField(opensocial.Person.Field.Gender);
        var gender = ownr_sex.getDisplayValue(); //THIS IS THE ERROR LINE

        uri=uri+"?gn=" + gender;
        getData(uri, contain);
}


Can any one let me know as what is the problem in my above code as it
is not working often.

Regards,
Javed


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Developer Forum" 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-orkut?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to