you need this code:

-------------------------------------------------------------------------------------------------------------------------------------------
function getArgs() {
      try {
              var q = document.URL.substring((document.URL.indexOf('?')
+1),document.URL.length);

              var a = q.split("&");
              var args = {};
              for (var i=0;i<a.length;i++) {
                      if (a[i] && a[i].indexOf('=')){
                              var arg = a[i].split('=');
                              args[arg[0]] = arg[1];
                      }
              }
              return args;
      } catch(err) {
              return {};
      }
  }

  // get the arguments array:
  var myArgs = getArgs();
  // now the mode variable will be set to either "canvas" or "profile"
  var mode = myArgs['mode'];
------------------------------------------------------------------------------------------------------------------------------------------------

The variable mode determines if it's canvas or profile.

On Nov 14, 10:26 am, Simon Willison <[EMAIL PROTECTED]> wrote:
> According to this page:
>
> http://code.google.com/apis/orkut/articles/anatomy.html
>
> ... gadgets can run in a showcase view (470x280px, embedded on a
> profile page) or a canvas view (765x600px, running on a separate
> page).
>
> Sure enough, if I add an OpenSocial gadget in the Orkut sandbox it
> appears in my profile but also gets a link in the left navbar, and
> clicking that link goes to a full page.
>
> How can a gadget be programmed to behave differently on the canvas
> view to how it behaves on the showcase view? How can a gadget tell
> which view it is currently running in?
>
> Thanks,
>
> Simon


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Orkut Discussion" group.
To post to this group, send email to opensocial-orkut@googlegroups.com
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