Hello Prahar it seems you are new to open social. Well Lets get the
basics Clear over here

For retrieving dynamic contents from server and showing to application
canvas page involves following steps

You can make request to your php file from xml .
You pass all the parameters required to your php file from xml
You have a callback function which fetches the html that is passed in
php


Your request can be either GET or POST

If you intend to send a GET request

/*cache clear code*/
   var d = new Date();
   var noCacheStr = d.getTime();
/*end*/
gadgets.io.makeRequest('http://yourwebsite.com/anything.php?
cache='+noCacheStr
+'&user_id='+orkut_opensocial_id,showUrlMessage,null);

function showUrlMessage(data)
{

Here in "data" variable you have the dynamic content you wanted to
show users and i think this is the part where you thought orkut made
world more rounder.......
alert(data);

}


If you intend to make a POST request

  var params = {};
  var postdata = {
                          orkut_id=: orkut_opensocial_id,
                         };
params[gadgets.io.RequestParameters.METHOD] =
gadgets.io.MethodType.POST;
params[gadgets.io.RequestParameters.POST_DATA] =
gadgets.io.encodeValues(postdata);

gadgets.io.makeRequest('http://yourwebsite.com/anything.php?
cache='+noCacheStr, showUrlMessage,params);

function showUrlMessage(data)
{

Here in "data" variable you have the dynamic content you wanted to
show users and i think this is the part where you thought orkut made
world more rounder.......
alert(data);

}

well about the parameter ?cache='+noCacheStr' is been appended so that
next time the data should not be taken from cache




I think the world is straight now Prakhar ....... :-)


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