I got your code to work by removing the keyword 'function' from within
the body of init:

...
var refreshInterval = 0;
makeCachedRequest(url, parseJSON, params, refreshInterval);

The URL you are trying to fetch from doesn't exist so it returns a 404
as expected. Try another URL (even http://www.google.com) instead.

- Jason

P.S. Since you're new to orkut development, you should check out the
OpenSocial Dev App at 
http://sandbox.orkut.com/Main#AppInfo.aspx?appId=291092957065,
which makes it easy to test and save sample OpenSocial code. Just add
output(jsonString) to your parseJSON function to see the response that
makeRequest returns directly within the app.

On Oct 28, 10:20 am, imoracle <[EMAIL PROTECTED]> wrote:
> I am doing it like this:
>
> function makeCachedRequest(url, callback, params, refreshInterval) {
>   var ts = new Date().getTime();
>   var sep = "?";
>   if (refreshInterval && refreshInterval > 0) {
>     ts = Math.floor(ts / (refreshInterval * 1000));
>   }
>   if (url.indexOf("?") > -1) {
>     sep = "&";
>   }
>   url = [ url, sep, "nocache=", ts ].join("");
>   gadgets.io.makeRequest(url, callback, params);
>
> }
>
> function parseJSON(obj) {
>   var jsonString = obj.text;
>
> }
>
> function init() {
>   var url = "http://mysite.com/returnJSON.php";;
>   var params = "";
>   var refreshInterval = 0;
>   function makeCachedRequest(url, parseJSON, params, refreshInterval);
>
> }
>
> Can someone help me here? I am new to orkut apps :(
--~--~---------~--~----~------------~-------~--~----~
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