Hi everyone,
Prashant i am still facing the same proble.. i dunno if its a problem with
my xml.. heres the full code.. please see...

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="OS Blood 1.0" />
<Require feature="opensocial-0.8"/>
  <Content type="html"><![CDATA[
<script type="text/javascript">
 var viewerid;
  function getViwerid()
  {
    //Make opensocial datarequest object
    var datreq=opensocial.newDataRequest();
    //Make idSpec object
    //var vspec=opensocial.IdSpec.PersonId.VIEWER;//This can be replace by
string 'VIEWER'
    //Make the requests
    var fetchviewer=datreq.newFetchPersonRequest('VIEWER');
    //Add the made requests to the data request object
    datareq.add(fetchviewer,'viewer');
    //Send the data request and give call back
    datareq.send(checkcallback);
  };
 function checkcallback(resp)
 {
     viewerid=resp.getId();
     regUser();
 };
 function regUser()
  {

    var bloodgp=document.getElementById('bloodgp').value;
    var age=document.getElementById('age').value;
    var postdata = {
            cuserid:viewerid,
            bgroup: bloodgp,
            age:age};
    makeRequest("http://xxxxxx.xxx/osblood/user.php";, postdata);    }


function makeRequest(url, postdata) {
  var params = {};
  postdata = gadgets.io.encodeValues(postdata);
  params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.POST;
  params[gadgets.io.RequestParameters.POST_DATA]= postdata;
  gadgets.io.makeRequest(url, response, params);
};

function response(obj) {
//    alert('the reply is : '+obj.text);
  document.getElementById('reply').innerHTML=obj.text;
};
</script>
<div id="reply"></div>
<div id="main"><p>Enter blood group : <input type="text" id="bloodgp"
name="bloodgp"/></p>
<p>Enter age data: <input type="text" id="age" name="age"/></p>
<p> <input type="button" id="confirm" name="confirm" value="Confirm"
onClick="getViwerid()"/></p></div>
]]></Content>
</Module>

Midhun Girish



On Sat, Mar 27, 2010 at 10:34 AM, Prashant (Google) <[email protected]> wrote:

> Hey Midhun,
>
> I don't see any issues with opensocial right now. Are you still facing
> this? I suspect it was probably something wrong with your XML.
>
> ~Prashant.
>
> On Mar 26, 8:00 pm, Midhun Girish <[email protected]> wrote:
> > Hi everyone,
> > I am getting "opensocial is not defined" error at the line
> > opensocial.newDataRequest();
> > on my gadget in orkut sandbox.....seems like opensocial.js is not getting
> > loaded is there any problem with google's  servers? or is it any problem
> > with my code? i gave the <Require feature="opensocial-0.8"/>   tag in the
> > xml and so i hope its not an issue with my code..Also the container was
> > working fine with the same code some hours before.... any one please
> help...
> >
> > Regards
> > Midhun Girish
>
> --
> 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]<opensocial-orkut%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/opensocial-orkut?hl=en.
>
>

-- 
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